mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-04 23:48:40 +00:00
fix crash on trying to convert *very* old 0.5 config files
This commit is contained in:
parent
6eb413dd1e
commit
42cceabd8e
1 changed files with 30 additions and 26 deletions
|
@ -76,6 +76,10 @@ class OldStateUpgrader:
|
||||||
log.debug("Unable to open 0.5 state file: %s", e)
|
log.debug("Unable to open 0.5 state file: %s", e)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if type(state).__name__ == 'list':
|
||||||
|
log.debug("0.5 state file is too old to upgrade:")
|
||||||
|
return
|
||||||
|
else:
|
||||||
new_state = deluge.core.torrentmanager.TorrentManagerState()
|
new_state = deluge.core.torrentmanager.TorrentManagerState()
|
||||||
for ti, uid in state.torrents.items():
|
for ti, uid in state.torrents.items():
|
||||||
torrent_path = os.path.join(self.config["config_location"], "torrentfiles", ti.filename)
|
torrent_path = os.path.join(self.config["config_location"], "torrentfiles", ti.filename)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue