summaryrefslogtreecommitdiffstats
path: root/module/gui/connector.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2011-02-14 19:31:58 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2011-02-14 19:31:58 +0100
commit25ee6e8ebb17bb144553e4958dae029857487bf2 (patch)
treebbdb52ddf43540199c8060852c6b043f154b1a7f /module/gui/connector.py
parentfinished cli (diff)
downloadpyload-25ee6e8ebb17bb144553e4958dae029857487bf2.tar.xz
no connection error on gui startup
Diffstat (limited to 'module/gui/connector.py')
-rw-r--r--module/gui/connector.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/module/gui/connector.py b/module/gui/connector.py
index 24af91993..594a0c316 100644
--- a/module/gui/connector.py
+++ b/module/gui/connector.py
@@ -34,6 +34,8 @@ class Connector(QObject):
manages the connection to the pyload core via thrift
"""
+ firstAttempt = True
+
def __init__(self):
QObject.__init__(self)
self.mutex = QMutex()
@@ -64,16 +66,19 @@ class Connector(QObject):
connect error signals,
check server version
"""
+ err = None
try:
client = ThriftClient(self.host, self.port, self.user, self.password)
except WrongLogin:
- self.emit(SIGNAL("errorBox"), _("bad login credentials"))
- return False
+ err = _("bad login credentials")
except NoSSL:
- self.emit(SIGNAL("errorBox"), _("no ssl support"))
- return False
+ err = _("no ssl support")
except NoConnection:
- self.emit(SIGNAL("errorBox"), _("can't connect to host"))
+ err = _("can't connect to host")
+ if err:
+ if not Connector.firstAttempt:
+ self.emit(SIGNAL("errorBox"), err)
+ Connector.firstAttempt = False
return False
self.proxy = DispatchRPC(self.mutex, client)