From 798f5e2deb10ec94f99d4b0ad7110a5e6da2ef1d Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 10 Oct 2016 21:57:23 +0100 Subject: [PATCH] [#2889] Fix for UnboundLocalError in exception handler --- deluge/core/torrentmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 298918a7d..9d88d8317 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -740,7 +740,7 @@ class TorrentManager(component.Component): os.fsync(state_file.fileno()) state_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 state from: %s", filepath_bak)