mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-15 23:08:41 +00:00
Handle an old 'tabs.state' gracefully by just using the defaults.
This commit is contained in:
parent
cfadbec2cf
commit
9b60cdd241
1 changed files with 7 additions and 1 deletions
|
@ -111,6 +111,12 @@ 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue