Better fix for #565

This commit is contained in:
Andrew Resch 2008-10-24 07:43:34 +00:00
parent dc0a2ce52e
commit 951c13f1ce
1 changed files with 2 additions and 9 deletions

View File

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