mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-12 11:20:09 +00:00
GTK: Fix showing exception error to user with no libtorrent installed
This commit is contained in:
parent
7c6d1f30ff
commit
7ef7cc41b6
1 changed files with 21 additions and 13 deletions
|
@ -304,7 +304,7 @@ class GtkUI(object):
|
||||||
# Turning off classic_mode
|
# Turning off classic_mode
|
||||||
self.config["classic_mode"] = False
|
self.config["classic_mode"] = False
|
||||||
self.__start_non_classic()
|
self.__start_non_classic()
|
||||||
|
try:
|
||||||
try:
|
try:
|
||||||
client.start_classic_mode()
|
client.start_classic_mode()
|
||||||
except deluge.error.DaemonRunningError:
|
except deluge.error.DaemonRunningError:
|
||||||
|
@ -312,9 +312,21 @@ class GtkUI(object):
|
||||||
_("Turn off Classic Mode?"),
|
_("Turn off Classic Mode?"),
|
||||||
_("It appears that a Deluge daemon process (deluged) is already running.\n\n\
|
_("It appears that a Deluge daemon process (deluged) is already running.\n\n\
|
||||||
You will either need to stop the daemon or turn off Classic Mode to continue.")).run()
|
You will either need to stop the daemon or turn off Classic Mode to continue.")).run()
|
||||||
|
|
||||||
self.started_in_classic = False
|
self.started_in_classic = False
|
||||||
d.addCallback(on_dialog_response)
|
d.addCallback(on_dialog_response)
|
||||||
|
except ImportError, e:
|
||||||
|
if "No module named libtorrent" in e.message:
|
||||||
|
d = dialogs.YesNoDialog(
|
||||||
|
_("Enable Thin Client Mode?"),
|
||||||
|
_("Thin client mode is only available because libtorrent is not installed.\n\n\
|
||||||
|
To use Deluge standalone (Classic mode) please install libtorrent.")).run()
|
||||||
|
self.started_in_classic = False
|
||||||
|
d.addCallback(on_dialog_response)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
|
component.start()
|
||||||
|
return
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
import traceback
|
import traceback
|
||||||
tb = sys.exc_info()
|
tb = sys.exc_info()
|
||||||
|
@ -329,10 +341,6 @@ Please see the details below for more information."), details=traceback.format_e
|
||||||
self.started_in_classic = False
|
self.started_in_classic = False
|
||||||
d.addCallback(on_dialog_response)
|
d.addCallback(on_dialog_response)
|
||||||
ed.addCallback(on_ed_response)
|
ed.addCallback(on_ed_response)
|
||||||
else:
|
|
||||||
component.start()
|
|
||||||
return
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.__start_non_classic()
|
self.__start_non_classic()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue