From a2d9a8eaf5fece86057aec951aa8b9f006233710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Wed, 6 Apr 2016 17:16:33 +0200 Subject: Quick and dirty crash fix --- 9kwpyqt.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to '9kwpyqt.py') 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) -- cgit v1.2.3