From 2352b475e2ceded06b25b3a327651b3c957a0536 Mon Sep 17 00:00:00 2001 From: Jeff Bryner Date: Mon, 15 Dec 2014 15:39:26 -0800 Subject: [PATCH] correct mixed tabs/spaces --- cron/backupDiscover.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/cron/backupDiscover.py b/cron/backupDiscover.py index 98b85f1a..42d06506 100644 --- a/cron/backupDiscover.py +++ b/cron/backupDiscover.py @@ -27,21 +27,21 @@ def discover(): config_rotation = [] config_pruning = [] for index in indices.keys(): - index_template = index - freq = 'none' - pruning = '0' - if re.search(r'-[0-9]{8}', index): - freq = 'daily' - pruning = '20' - index_template = index[:-9] - elif re.search(r'-[0-9]{6}', index): - freq = 'monthly' - index_template = index[:-7] - if index_template not in config_indices: - config_indices.append(index_template) - config_dobackup.append('1') - config_rotation.append(freq) - config_pruning.append(pruning) + index_template = index + freq = 'none' + pruning = '0' + if re.search(r'-[0-9]{8}', index): + freq = 'daily' + pruning = '20' + index_template = index[:-9] + elif re.search(r'-[0-9]{6}', index): + freq = 'monthly' + index_template = index[:-7] + if index_template not in config_indices: + config_indices.append(index_template) + config_dobackup.append('1') + config_rotation.append(freq) + config_pruning.append(pruning) setConfig('backup_indices', ','.join(config_indices), options.configfile) setConfig('backup_dobackup', ','.join(config_dobackup), options.configfile) setConfig('backup_rotation', ','.join(config_rotation), options.configfile) @@ -83,4 +83,4 @@ if __name__ == '__main__': help="configuration file to use") (options, args) = parser.parse_args() initConfig() - discover() + discover() \ No newline at end of file