Handle an old 'tabs.state' gracefully by just using the defaults.

This commit is contained in:
Andrew Resch 2008-07-17 20:39:07 +00:00
parent cfadbec2cf
commit 9b60cdd241
1 changed files with 7 additions and 1 deletions

View File

@ -110,7 +110,13 @@ class TorrentDetails(component.Component):
# Get the state from saved file # Get the state from saved file
state = self.load_state() state = self.load_state()
for item in state:
if not isinstance(item, tuple):
log.debug("Old tabs.state, using default..")
state = None
break
# The state is a list of tab_names in the order they should appear # The state is a list of tab_names in the order they should appear
if state == None: if state == None:
# Set the default order # Set the default order