Fix some exceptions.
This commit is contained in:
parent
c030789e09
commit
8f592b6330
|
@ -58,7 +58,7 @@ def start_ui():
|
||||||
|
|
||||||
from deluge.ui.ui import UI
|
from deluge.ui.ui import UI
|
||||||
log.info("Starting ui..")
|
log.info("Starting ui..")
|
||||||
UI()
|
UI(args)
|
||||||
|
|
||||||
def start_daemon():
|
def start_daemon():
|
||||||
"""Entry point for daemon script"""
|
"""Entry point for daemon script"""
|
||||||
|
|
|
@ -85,7 +85,7 @@ DEFAULT_PREFS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class GtkUI:
|
class GtkUI:
|
||||||
def __init__(self):
|
def __init__(self, args):
|
||||||
# Initialize gettext
|
# Initialize gettext
|
||||||
locale.setlocale(locale.LC_MESSAGES, '')
|
locale.setlocale(locale.LC_MESSAGES, '')
|
||||||
locale.bindtextdomain("deluge",
|
locale.bindtextdomain("deluge",
|
||||||
|
|
|
@ -93,7 +93,11 @@ class SignalReceiver(
|
||||||
# shutdowns.. This is because handle_request() is a blocking call.
|
# shutdowns.. This is because handle_request() is a blocking call.
|
||||||
receiver = xmlrpclib.ServerProxy("http://localhost:" + str(self.port),
|
receiver = xmlrpclib.ServerProxy("http://localhost:" + str(self.port),
|
||||||
allow_none=True)
|
allow_none=True)
|
||||||
|
try:
|
||||||
receiver.emit_signal("shutdown", None)
|
receiver.emit_signal("shutdown", None)
|
||||||
|
except:
|
||||||
|
# We don't care about errors at this point
|
||||||
|
pass
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""This gets called when we start the thread"""
|
"""This gets called when we start the thread"""
|
||||||
|
|
|
@ -40,11 +40,11 @@ DEFAULT_PREFS = {
|
||||||
}
|
}
|
||||||
|
|
||||||
class UI:
|
class UI:
|
||||||
def __init__(self):
|
def __init__(self, args):
|
||||||
log.debug("UI init..")
|
log.debug("UI init..")
|
||||||
self.config = ConfigManager("ui.conf", DEFAULT_PREFS)
|
self.config = ConfigManager("ui.conf", DEFAULT_PREFS)
|
||||||
|
|
||||||
if self.config["selected_ui"] == "gtk":
|
if self.config["selected_ui"] == "gtk":
|
||||||
log.info("Starting GtkUI..")
|
log.info("Starting GtkUI..")
|
||||||
from deluge.ui.gtkui.gtkui import GtkUI
|
from deluge.ui.gtkui.gtkui import GtkUI
|
||||||
ui = GtkUI()
|
ui = GtkUI(args)
|
||||||
|
|
Loading…
Reference in New Issue