From 951c13f1ce7dbcc9dc96697259d3ffdc2e9320fa Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 24 Oct 2008 07:43:34 +0000 Subject: [PATCH] Better fix for #565 --- deluge/ui/gtkui/connectionmanager.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index ea5e22dc6..35d20453e 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -127,11 +127,7 @@ class ConnectionManager(component.Component): # If classic mode is set, we just start up a localhost daemon and connect to it if self.gtkui_config["classic_mode"]: uri = "http://localhost:58846" - if deluge.common.windows_check(): - win32api.WinExec("deluged -p 58846") - else: - subprocess.call(["deluged", "-p 58846"]) - time.sleep(0.1) + self.start_localhost(58846) # We need to wait for the host to start before connecting while not self.test_online_status(uri): time.sleep(0.01) @@ -162,10 +158,7 @@ class ConnectionManager(component.Component): port = uri[7:].split(":")[1] # First add it to the list self.add_host("localhost", port) - if deluge.common.windows_check(): - win32api.WinExec("deluged -p %s" % port) - else: - subprocess.call(["deluged", "-p %s" % port]) + self.start_localhost(port) # We need to wait for the host to start before connecting while not self.test_online_status(uri): time.sleep(0.01)