From 2bb415f42e25c22b4f92608815c4ffec28ae396c Mon Sep 17 00:00:00 2001 From: rmNULL Date: Sat, 21 Jan 2017 05:04:55 +0530 Subject: [PATCH] resolved issue #451 and fixed the syntax error in except block --- bin/autojump_data.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/autojump_data.py b/bin/autojump_data.py index 37878ea..6a4aebd 100644 --- a/bin/autojump_data.py +++ b/bin/autojump_data.py @@ -130,12 +130,14 @@ def save(config, data): f.flush() os.fsync(f) + + # move temp_file -> autojump.txt + move_file(temp.name, config['data_path']) except IOError as ex: - print('Error saving autojump data (disk full?)' % ex, file=sys.stderr) + print('%s Error saving autojump data (disk full?)' % ex, file=sys.stderr) sys.exit(1) - # move temp_file -> autojump.txt - move_file(temp.name, config['data_path']) + # create backup file if it doesn't exist or is older than BACKUP_THRESHOLD if not os.path.exists(config['backup_path']) or \