summaryrefslogtreecommitdiffstats
path: root/module/gui
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-30 15:57:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-30 15:57:17 +0200
commitaf6f0e882f9d533dcb0271c1afbc7210532363b4 (patch)
treea0e5756077d3c9383a55f7cc2f48f20688b045bd /module/gui
parentfixed name clash in C# (diff)
downloadpyload-af6f0e882f9d533dcb0271c1afbc7210532363b4.tar.xz
little GUI and API fixes
Diffstat (limited to 'module/gui')
-rw-r--r--module/gui/Collector.py8
-rw-r--r--module/gui/connector.py6
2 files changed, 10 insertions, 4 deletions
diff --git a/module/gui/Collector.py b/module/gui/Collector.py
index c569785e2..3ec4262f1 100644
--- a/module/gui/Collector.py
+++ b/module/gui/Collector.py
@@ -71,13 +71,13 @@ class CollectorModel(QAbstractItemModel):
called from main loop, pass events to the correct methods
"""
QMutexLocker(self.mutex)
- if event.event == "reload":
+ if event.eventname == "reload":
self.fullReload()
- elif event.event == "remove":
+ elif event.eventname == "remove":
self.removeEvent(event)
- elif event.event == "insert":
+ elif event.eventname == "insert":
self.insertEvent(event)
- elif event.event == "update":
+ elif event.eventname == "update":
self.updateEvent(event)
def fullReload(self):
diff --git a/module/gui/connector.py b/module/gui/connector.py
index 91f23dafb..74d791776 100644
--- a/module/gui/connector.py
+++ b/module/gui/connector.py
@@ -46,6 +46,7 @@ class Connector(QObject):
self.password = None
self.ssl = None
self.running = True
+ self.internal = False
self.proxy = self.Dummy()
def setConnectionData(self, host, port, user, password, ssl=False):
@@ -66,6 +67,8 @@ class Connector(QObject):
connect error signals,
check server version
"""
+ if self.internal: return True
+
err = None
try:
client = ThriftClient(self.host, self.port, self.user, self.password)
@@ -103,6 +106,9 @@ class Connector(QObject):
"""
dummy rpc proxy, to prevent errors
"""
+ def __nonzero__(self):
+ return False
+
def __getattr__(self, attr):
def dummy(*args, **kwargs):
return None