From 230f2d151b39f41765fa96f4a62c268dc09caf97 Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Thu, 1 Mar 2007 22:11:35 +0000 Subject: [PATCH] won;t crash if trying to pause with no torrents --- src/delugegtk.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/delugegtk.py b/src/delugegtk.py index 9853f0dc9..cf0650909 100644 --- a/src/delugegtk.py +++ b/src/delugegtk.py @@ -392,7 +392,10 @@ class DelugeGTK: def start_pause(self, widget): print "Pause btn clicked" unique_id = self.get_selected_torrent() - self.manager.set_user_pause(unique_id, not self.manager.is_user_paused(unique_id)) + try: + self.manager.set_user_pause(unique_id, not self.manager.is_user_paused(unique_id)) + except KeyError: + pass def build_summary_tab(self): #Torrent Summary tab