1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

resolved issue #451 and fixed the syntax error in except block

This commit is contained in:
rmNULL 2017-01-21 05:04:55 +05:30
parent 865476ed56
commit 2bb415f42e

View File

@ -130,12 +130,14 @@ def save(config, data):
f.flush() f.flush()
os.fsync(f) os.fsync(f)
# move temp_file -> autojump.txt
move_file(temp.name, config['data_path'])
except IOError as ex: 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) 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 # create backup file if it doesn't exist or is older than BACKUP_THRESHOLD
if not os.path.exists(config['backup_path']) or \ if not os.path.exists(config['backup_path']) or \