[Core] Fix UnboundLocalError in torrentmanager
This commit is contained in:
parent
90a22af5e5
commit
4e5754b285
|
@ -829,7 +829,7 @@ class TorrentManager(component.Component):
|
||||||
os.fsync(fastresume_file.fileno())
|
os.fsync(fastresume_file.fileno())
|
||||||
fastresume_file.close()
|
fastresume_file.close()
|
||||||
os.rename(filepath_tmp, filepath)
|
os.rename(filepath_tmp, filepath)
|
||||||
except IOError:
|
except IOError, ex:
|
||||||
log.error("Unable to save %s: %s", filepath, ex)
|
log.error("Unable to save %s: %s", filepath, ex)
|
||||||
if os.path.isfile(filepath_bak):
|
if os.path.isfile(filepath_bak):
|
||||||
log.info("Restoring backup of fastresume from: %s", filepath_bak)
|
log.info("Restoring backup of fastresume from: %s", filepath_bak)
|
||||||
|
|
Loading…
Reference in New Issue