summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-04-06 17:16:33 +0200
committerAndré Glüpker <git@wgmd.de>2016-04-06 17:16:33 +0200
commita2d9a8eaf5fece86057aec951aa8b9f006233710 (patch)
tree876beaf7be3a44757fbdd15d54099e986a050217
parentca3b788323222dc7a21738ae1ca25ea66e6d09b3 (diff)
download9kwpyqt-a2d9a8eaf5fece86057aec951aa8b9f006233710.tar.gz
9kwpyqt-a2d9a8eaf5fece86057aec951aa8b9f006233710.tar.bz2
9kwpyqt-a2d9a8eaf5fece86057aec951aa8b9f006233710.zip
Quick and dirty crash fix
-rwxr-xr-x9kwpyqt.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index b0bf71d..a0d2534 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -224,8 +224,12 @@ class CaptchaGUI(QWidget):
for stat in datatmp:
tmp = stat.split('=')
data[tmp[0]] = tmp[1]
- self.currentQueued = int(data['queue'])
- self.currentWorker = int(data['workertext'])
+ self.currentQueued = 0
+ self.currentWorker = 0
+ if 'queue' in data and data['queue'].isnumeric():
+ self.currentQueued = int(data['queue'])
+ if 'workertext' in data and data['workertext'].isnumeric():
+ self.currentWorker = int(data['workertext'])
self.updateStats()
self.networkQueueReply.deleteLater()
QTimer.singleShot(5000, self.getQueue)