Changeset 4af387
- Timestamp:
- 01/18/2010 02:36:03 AM (16 years ago)
- Children:
- 368613
- Parents:
- a62fda
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
ra62fda r4af387 1 === Deluge 1.2.1 === 2 ==== GtkUI ==== 3 * Fix #1128 Show an error dialog when unable to start a 'deluged' process 4 1 5 === Deluge 1.2.0 - "Bursting like an infected kidney" (10 January 2010) === 2 6 ==== Core ==== -
deluge/ui/client.py
ra62fda r4af387 536 536 Starts a daemon process. 537 537 538 :param port: int, the port for the daemon to listen on 539 :param config: str, the path to the current config folder 538 :param port: the port for the daemon to listen on 539 :type port: int 540 :param config: the path to the current config folder 541 :type config: str 540 542 :returns: True if started, False if not 541 543 :rtype: bool 544 545 :raises OSError: received from subprocess.call() 546 542 547 """ 543 548 try: … … 548 553 else: 549 554 subprocess.call(["deluged", "--port=%s" % port, "--config=%s" % config]) 555 except OSError, e: 556 log.exception(e) 557 raise e 550 558 except Exception, e: 551 559 log.error("Unable to start daemon!") -
deluge/ui/gtkui/connectionmanager.py
ra62fda r4af387 50 50 from deluge.configmanager import ConfigManager 51 51 from deluge.log import LOG as log 52 import dialogs 52 53 53 54 DEFAULT_HOST = "127.0.0.1" … … 397 398 True) 398 399 400 def start_daemon(self, port, config): 401 """ 402 Attempts to start a daemon process and will show an ErrorDialog if unable 403 to. 404 """ 405 try: 406 return client.start_daemon(port, config) 407 except OSError, e: 408 if e.errno == 2: 409 dialogs.ErrorDialog( 410 _("Unable to start daemon!"), 411 _("Deluge cannot find the 'deluged' executable, it is likely \ 412 that you forgot to install the deluged package or it's not in your PATH.")).run() 413 else: 414 raise e 415 except Exception, e: 416 import traceback 417 import sys 418 tb = sys.exc_info() 419 dialogs.ErrorDialog( 420 _("Unable to start daemon!"), 421 _("Please examine the details for more information."), 422 details=traceback.format_exc(tb[2])).run() 423 399 424 # Signal handlers 400 425 def __on_connected(self, connector, host_id): … … 424 449 host in ("127.0.0.1", "localhost"): 425 450 # We need to start this localhost 426 client.start_daemon(port, deluge.configmanager.get_config_dir())451 self.start_daemon(port, deluge.configmanager.get_config_dir()) 427 452 428 453 def on_connect_fail(result, try_counter): … … 505 530 self.add_host(DEFAULT_HOST, DEFAULT_PORT) 506 531 # ..and start the daemon. 507 client.start_daemon(DEFAULT_PORT, deluge.configmanager.get_config_dir())532 self.start_daemon(DEFAULT_PORT, deluge.configmanager.get_config_dir()) 508 533 return 509 534 … … 539 564 540 565 elif status == _("Offline"): 541 client.start_daemon(port, deluge.configmanager.get_config_dir())566 self.start_daemon(port, deluge.configmanager.get_config_dir()) 542 567 reactor.callLater(2.0, self.__update_list) 543 568
Note:
See TracChangeset
for help on using the changeset viewer.