Fix [4491] which broke the oldstateupgrade

This commit is contained in:
Andrew Resch 2009-01-14 02:45:11 +00:00
parent e42910dbf8
commit f990fd1a9a
1 changed files with 29 additions and 28 deletions

View File

@ -76,10 +76,11 @@ class OldStateUpgrader:
log.debug("Unable to open 0.5 state file: %s", e)
return
# Check to see if we can upgrade this file
if type(state).__name__ == 'list':
log.debug("0.5 state file is too old to upgrade:")
log.warning("0.5 state file is too old to upgrade")
return
else:
new_state = deluge.core.torrentmanager.TorrentManagerState()
for ti, uid in state.torrents.items():
torrent_path = os.path.join(self.config["config_location"], "torrentfiles", ti.filename)