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