diff options
author | mkaay <mkaay@mkaay.de> | 2011-03-13 21:21:44 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2011-03-13 21:21:44 +0100 |
commit | a2990617833baab37f39d0fe5f877849643e4738 (patch) | |
tree | 2304c8f7380f4a688f471d83378bfec07b1256a2 /module/gui | |
parent | make sure everything is written to disk before merging (diff) | |
download | pyload-a2990617833baab37f39d0fe5f877849643e4738.tar.xz |
captcha fix
Diffstat (limited to 'module/gui')
-rw-r--r-- | module/gui/Collector.py | 10 | ||||
-rw-r--r-- | module/gui/connector.py | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/module/gui/Collector.py b/module/gui/Collector.py index 833942eac..cae429de3 100644 --- a/module/gui/Collector.py +++ b/module/gui/Collector.py @@ -144,7 +144,10 @@ class CollectorModel(QAbstractItemModel): inserts a new element in the model """ if event.type == ElementType.File: - info = self.connector.getFileData(event.id) + try: + info = self.connector.getFileData(event.id) + except FileDoesNotExists: + return for k, package in enumerate(self._data): if package.id == info.package: @@ -167,8 +170,9 @@ class CollectorModel(QAbstractItemModel): update an element in the model """ if event.type == ElementType.File: - info = self.connector.proxy.getFileData(event.id) - if not info: + try: + info = self.connector.proxy.getFileData(event.id) + except FileDoesNotExists: return for p, package in enumerate(self._data): if package.id == info.packageID: diff --git a/module/gui/connector.py b/module/gui/connector.py index 634912f64..707bb6a32 100644 --- a/module/gui/connector.py +++ b/module/gui/connector.py @@ -154,4 +154,6 @@ class DispatchRPC(QObject): finally: self.mutex.unlock() if lost: + from traceback import print_exc + print_exc() self.dispatcher.emit(SIGNAL("connectionLost")) |