[Core] Fix UnboundLocalError in torrentmanager

This commit is contained in:
bendikro 2015-12-17 00:35:09 +01:00 committed by Calum Lind
parent 90a22af5e5
commit 4e5754b285
1 changed files with 1 additions and 1 deletions

View File

@ -829,7 +829,7 @@ class TorrentManager(component.Component):
os.fsync(fastresume_file.fileno())
fastresume_file.close()
os.rename(filepath_tmp, filepath)
except IOError:
except IOError, ex:
log.error("Unable to save %s: %s", filepath, ex)
if os.path.isfile(filepath_bak):
log.info("Restoring backup of fastresume from: %s", filepath_bak)