5 Commits

Author SHA1 Message Date
8232776e41 Bad env path? 2019-08-30 16:14:18 -07:00
ebfcdeb70b Noop to test hook 2019-08-06 16:42:09 -07:00
13deb5677b Changing yaml.load() to yaml.safe_load() 2019-07-16 12:06:20 -07:00
b750f65311 Tweak log output 2019-03-13 04:24:38 -07:00
3a18c1fad8 Set script to executable 2019-03-13 03:32:39 -07:00

8
backup-rotator Normal file → Executable file
View File

@ -1,4 +1,4 @@
#!/usr/env python3 #!/usr/bin/env python3
""" """
@ -72,11 +72,11 @@ class BackupRotator:
if arg == "--config": if arg == "--config":
i, one_path = self.consume_argument_companion(i) i, one_path = self.consume_argument_companion(i)
self.__config_paths.append(one_path) self.__config_paths.append(one_path)
print("Found config path argument:", one_path) self.log("Found config path argument:", one_path)
elif arg == "--dry-run": elif arg == "--dry-run":
self.__dry_run = True self.__dry_run = True
print("Activating global dry-run mode") self.log("Activating global dry-run mode")
@staticmethod @staticmethod
def consume_argument_companion(arg_index): def consume_argument_companion(arg_index):
@ -114,7 +114,7 @@ class BackupRotator:
raise Exception("Unable to open config file: " + path) raise Exception("Unable to open config file: " + path)
# Parse # Parse
config = yaml.load(f) config = yaml.safe_load(f)
# Add its own path # Add its own path
config["__path"] = path config["__path"] = path