mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
[#2889] Fix for UnboundLocalError in exception handler
This commit is contained in:
parent
a7fe4d4510
commit
798f5e2deb
@ -740,7 +740,7 @@ class TorrentManager(component.Component):
|
|||||||
os.fsync(state_file.fileno())
|
os.fsync(state_file.fileno())
|
||||||
state_file.close()
|
state_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 state from: %s", filepath_bak)
|
log.info("Restoring backup of state from: %s", filepath_bak)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user