From 66951ce1ae1b3ca060a39219b564e33e670026b9 Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 19 Nov 2019 04:41:38 -0800 Subject: [PATCH 1/3] rename to avoid bad identifiers --- backup-rotator => BackupRotator.py | 10 ---------- main.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) rename backup-rotator => BackupRotator.py (98%) create mode 100644 main.py diff --git a/backup-rotator b/BackupRotator.py similarity index 98% rename from backup-rotator rename to BackupRotator.py index a96af48..992ae33 100755 --- a/backup-rotator +++ b/BackupRotator.py @@ -246,13 +246,3 @@ class BackupRotator: else: self.log("Purging directory:", dir_path) shutil.rmtree(dir_path) - - -def main(): - - rotator = BackupRotator() - rotator.run() - - -if __name__ == "__main__": - main() diff --git a/main.py b/main.py new file mode 100644 index 0000000..4304b9f --- /dev/null +++ b/main.py @@ -0,0 +1,14 @@ + + +from BackupRotator import BackupRotator + + +# +def main(): + + rotator = BackupRotator() + rotator.run() + + +if __name__ == "__main__": + main() From 644a023d5def00eafe8197af7f8f1fccd942da7e Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 19 Nov 2019 04:43:17 -0800 Subject: [PATCH 2/3] ignore pycache --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 1ee1173..95635f3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,8 @@ # Ignore PyCharm .idea +# +__pycache__ + + From 95840f10d4979054e8f8fb6ebdf21bb4eeb85895 Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 19 Nov 2019 04:43:23 -0800 Subject: [PATCH 3/3] Make main.py executable --- main.py | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 main.py diff --git a/main.py b/main.py old mode 100644 new mode 100755 index 4304b9f..3161e0c --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from BackupRotator import BackupRotator