Fix some exceptions.

This commit is contained in:
Andrew Resch 2007-10-27 04:35:09 +00:00
parent c030789e09
commit 8f592b6330
4 changed files with 9 additions and 5 deletions

View File

@ -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"""

View File

@ -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",

View File

@ -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)
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"""

View File

@ -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)