From 9b60cdd2415dbb6e2a29c4d96c26e3d1b492f275 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 17 Jul 2008 20:39:07 +0000 Subject: [PATCH] Handle an old 'tabs.state' gracefully by just using the defaults. --- deluge/ui/gtkui/torrentdetails.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/torrentdetails.py b/deluge/ui/gtkui/torrentdetails.py index 2a7de5b1e..1ad9f9d51 100644 --- a/deluge/ui/gtkui/torrentdetails.py +++ b/deluge/ui/gtkui/torrentdetails.py @@ -110,7 +110,13 @@ class TorrentDetails(component.Component): # Get the state from saved file 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 if state == None: # Set the default order