From cf0cdf86440d4b8468212dd47cef1d89e03350a5 Mon Sep 17 00:00:00 2001 From: archetipo Date: Wed, 22 Jul 2015 16:08:16 +0200 Subject: [PATCH] [FIX] flake8 and pylint --- auto_backup/model/backup_scheduler.py | 24 ++++++++++++------------ auto_backup/tests/__init__.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/auto_backup/model/backup_scheduler.py b/auto_backup/model/backup_scheduler.py index 96ed67072..262d56fd2 100644 --- a/auto_backup/model/backup_scheduler.py +++ b/auto_backup/model/backup_scheduler.py @@ -359,18 +359,18 @@ class db_backup(models.Model): except Exception: pass - """Remove all old files (on local server) in case this is configured.. - This is done after the SFTP writing to prevent unusual behaviour: - If the user would set local back-ups to be kept 0 days and the SFTP - to keep backups xx days there wouldn't be any new back-ups added - to the SFTP. - If we'd remove the dump files before they're writen to the SFTP - there willbe nothing to write. Meaning that if an user doesn't want - to keep back-ups locally and only wants them on the SFTP - (NAS for example) there wouldn't be any writing to the - remote server if this if statement was before the SFTP write method - right above this comment. - """ + # Remove all old files (on local server) in case this is configured.. + # This is done after the SFTP writing to prevent unusual behaviour: + # If the user would set local back-ups to be kept 0 days and the SFTP + # to keep backups xx days there wouldn't be any new back-ups added + # to the SFTP. + # If we'd remove the dump files before they're writen to the SFTP + # there willbe nothing to write. Meaning that if an user doesn't want + # to keep back-ups locally and only wants them on the SFTP + # (NAS for example) there wouldn't be any writing to the + # remote server if this if statement was before the SFTP write method + # right above this comment. + if rec.autoremove is True: dir = rec.bkp_dir # Loop over all files in the directory. diff --git a/auto_backup/tests/__init__.py b/auto_backup/tests/__init__.py index b35cb6653..01e81ba8a 100644 --- a/auto_backup/tests/__init__.py +++ b/auto_backup/tests/__init__.py @@ -19,4 +19,4 @@ # ############################################################################## -from . import test_auto_backup \ No newline at end of file +from . import test_auto_backup