From 2d23d1d538d9dad301ef68638f9c3ecdd5de73e3 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Tue, 14 Apr 2020 17:26:24 +0200 Subject: [PATCH] rename --- auto_backup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auto_backup.py b/auto_backup.py index a033e05..f716ec6 100644 --- a/auto_backup.py +++ b/auto_backup.py @@ -42,24 +42,24 @@ class AutoBackup(plugins.Plugin): try: display = agent.view() - logging.info("AUTO-BACKUP: Backing up ...") + logging.info("AUTO_BACKUP: Backing up ...") display.set('status', 'Backing up ...') display.update() for cmd in self.options['commands']: - logging.info(f"AUTO-BACKUP: Running {cmd.format(files=files_to_backup)}") + logging.info(f"AUTO_BACKUP: Running {cmd.format(files=files_to_backup)}") process = subprocess.Popen(cmd.format(files=files_to_backup), shell=True, stdin=None, stdout=open("/dev/null", "w"), stderr=None, executable="/bin/bash") process.wait() if process.returncode > 0: raise OSError(f"Command failed (rc: {process.returncode})") - logging.info("AUTO-BACKUP: backup done") + logging.info("AUTO_BACKUP: backup done") display.set('status', 'Backup done!') display.update() self.status.update() except OSError as os_e: self.tries += 1 - logging.info(f"AUTO-BACKUP: Error: {os_e}") + logging.info(f"AUTO_BACKUP: Error: {os_e}") display.set('status', 'Backup failed!') display.update()