Fix starting daemon from deluge in windows
This commit is contained in:
parent
e0ce28cb8f
commit
8f55b4f5ae
|
@ -120,7 +120,7 @@ class ConnectionManager(component.Component):
|
||||||
# If classic mode is set, we just start up a localhost daemon and connect to it
|
# If classic mode is set, we just start up a localhost daemon and connect to it
|
||||||
if self.gtkui_config["classic_mode"]:
|
if self.gtkui_config["classic_mode"]:
|
||||||
uri = "http://localhost:58846"
|
uri = "http://localhost:58846"
|
||||||
os.popen("deluged -p 58846")
|
os.spawnlp(os.P_NOWAIT, "deluged", "-p", "58846")
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
# We need to wait for the host to start before connecting
|
# We need to wait for the host to start before connecting
|
||||||
while not self.test_online_status(uri):
|
while not self.test_online_status(uri):
|
||||||
|
@ -152,8 +152,7 @@ class ConnectionManager(component.Component):
|
||||||
port = uri[7:].split(":")[1]
|
port = uri[7:].split(":")[1]
|
||||||
# First add it to the list
|
# First add it to the list
|
||||||
self.add_host("localhost", port)
|
self.add_host("localhost", port)
|
||||||
|
os.spawnlp(os.P_NOWAIT, "deluged", "-p", port)
|
||||||
os.popen("deluged -p %s" % port)
|
|
||||||
# We need to wait for the host to start before connecting
|
# We need to wait for the host to start before connecting
|
||||||
while not self.test_online_status(uri):
|
while not self.test_online_status(uri):
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
|
@ -425,7 +424,7 @@ class ConnectionManager(component.Component):
|
||||||
port = str(port)
|
port = str(port)
|
||||||
log.info("Starting localhost:%s daemon..", port)
|
log.info("Starting localhost:%s daemon..", port)
|
||||||
# Spawn a local daemon
|
# Spawn a local daemon
|
||||||
os.popen("deluged -p %s" % port)
|
os.spawnlp(os.P_NOWAIT, "deluged", "-p", port)
|
||||||
|
|
||||||
def on_button_close_clicked(self, widget):
|
def on_button_close_clicked(self, widget):
|
||||||
log.debug("on_button_close_clicked")
|
log.debug("on_button_close_clicked")
|
||||||
|
|
Loading…
Reference in New Issue