From c32eddfc48379bd37ac4b9f4742f2d08234c69fb Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Thu, 11 Dec 2008 09:20:32 +0000 Subject: [PATCH] Fix starting with new config folder --- deluge/ui/gtkui/connectionmanager.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index 3e634f9d5..6ed56ae3e 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -152,7 +152,13 @@ class ConnectionManager(component.Component): if self.gtkui_config["classic_mode"]: self.start_localhost(DEFAULT_PORT) # We need to wait for the host to start before connecting - uri = get_localhost_auth_uri(DEFAULT_URI) + uri = None + while not uri: + # We need to keep trying because the daemon may not have been started yet + # and the 'auth' file may not have been created + uri = get_localhost_auth_uri(DEFAULT_URI) + time.sleep(0.01) + while not self.test_online_status(uri): time.sleep(0.01) client.set_core_uri(uri)