From 2cebfca612cd7f55e06d794be7aa7e1d1e4275aa Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 8 Aug 2007 21:46:47 +0000 Subject: [PATCH] add try to capture possible error --- src/interface.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/interface.py b/src/interface.py index ece1e7489..2fd9d3a5c 100644 --- a/src/interface.py +++ b/src/interface.py @@ -640,19 +640,18 @@ class DelugeGTK: def open_folder(self, widget): unique_ids = self.get_selected_torrent_rows() -# try: - for uid in unique_ids: - if self.config.get("file_manager") == 0: - command = "/usr/bin/konqueror" - if self.config.get("file_manager") == 1: - command = "/usr/bin/nautilus" - if self.config.get("file_manager") == 2: - command = "/usr/bin/thunar" -# print "command %s uid %i dir %s\n" %(command, uid, self.manager.unique_IDs[uid].save_dir) + try: + for uid in unique_ids: + if self.config.get("file_manager") == 0: + command = "/usr/bin/konqueror" + if self.config.get("file_manager") == 1: + command = "/usr/bin/nautilus" + if self.config.get("file_manager") == 2: + command = "/usr/bin/thunar" os.system('%s %s' %(command, self.manager.unique_IDs[uid].save_dir)) self.update() -# except KeyError: - # pass + except KeyError: + pass def tor_start(self, widget): unique_ids = self.get_selected_torrent_rows()