From 42118932f25940a7a78224ab804fec98b0531184 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 6 Aug 2012 15:54:28 -0700 Subject: [PATCH] Fix exception handling --- deluge/core/torrentmanager.py | 2 +- deluge/ui/gtkui/torrentview.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index df94550b3..a378a2255 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -598,7 +598,7 @@ class TorrentManager(component.Component): # Remove the torrent from deluge's session try: del self.torrents[torrent_id] - except KeyError, ValueError: + except (KeyError, ValueError): return False # Save the session state diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index 9617832f1..0634e465e 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -516,7 +516,7 @@ class TorrentView(listview.ListView, component.Component): return [] return torrent_ids - except ValueError, TypeError: + except (ValueError, TypeError): return [] def get_torrent_status(self, torrent_id):