From c8901d31c5b5f2a14ac2594293a5b237f90324ea Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 8 Oct 2008 13:32:02 +0000 Subject: [PATCH] Fix freezing on start-up issues on systems that do not have a properly configured localhost entry. --- deluge/core/core.py | 2 +- deluge/ui/gtkui/connectionmanager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/core/core.py b/deluge/core/core.py index 9839af3df..4964980a2 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -89,7 +89,7 @@ class Core( if self.config["allow_remote"]: hostname = "" else: - hostname = "localhost" + hostname = "127.0.0.1" # Setup the xmlrpc server try: diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index 0273f568b..b028b7e09 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -333,7 +333,7 @@ class ConnectionManager(component.Component): online = True host = None try: - host = xmlrpclib.ServerProxy(uri) + host = xmlrpclib.ServerProxy(uri.replace("localhost", "127.0.0.1")) host.ping() except socket.error: online = False