summaryrefslogtreecommitdiffstats
path: root/deluge/core
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/core')
-rw-r--r--deluge/core/torrentmanager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py
index c49e8c901..996f5c441 100644
--- a/deluge/core/torrentmanager.py
+++ b/deluge/core/torrentmanager.py
@@ -608,7 +608,7 @@ class TorrentManager(component.Component):
os.path.join(get_config_dir(), "state", "torrents.state"), "rb")
state = cPickle.load(state_file)
state_file.close()
- except (EOFError, IOError, Exception), e:
+ except (EOFError, IOError, Exception, cPickle.UnpicklingError), e:
log.warning("Unable to load state file: %s", e)
# Try to use an old state
@@ -683,8 +683,8 @@ class TorrentManager(component.Component):
state_file.flush()
os.fsync(state_file.fileno())
state_file.close()
- except IOError:
- log.warning("Unable to save state file.")
+ except IOError, e:
+ log.warning("Unable to save state file: %s", e)
return True
# We have to move the 'torrents.state.new' file to 'torrents.state'