summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-04-06 17:16:43 +0200
committerAndré Glüpker <git@wgmd.de>2016-04-06 17:16:43 +0200
commit7a5ed7d804efe39b43dc2f2c79e87bc627617e8b (patch)
tree99e33c87331a19d7976b076dd0106fe5c7aa6a4d
parenta2d9a8eaf5fece86057aec951aa8b9f006233710 (diff)
download9kwpyqt-7a5ed7d804efe39b43dc2f2c79e87bc627617e8b.tar.gz
9kwpyqt-7a5ed7d804efe39b43dc2f2c79e87bc627617e8b.tar.bz2
9kwpyqt-7a5ed7d804efe39b43dc2f2c79e87bc627617e8b.zip
More status text
-rwxr-xr-x9kwpyqt.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index a0d2534..b3b7359 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -240,6 +240,8 @@ class CaptchaGUI(QWidget):
QTimer.singleShot(500, self.getCaptchaID)
self.startstopButton.setStyleSheet("QPushButton { background-color: green; }")
return
+ if self.waitingoncaptcha == 0:
+ self.captchaImage.setText("Asking server for new captcha...")
self.startstopButton.setStyleSheet("QPushButton { background-color: red; }")
url = QUrl(self.apiurl+"action=usercaptchanew&text=yes&mouse=0&confirm=0")
self.networkCaptchaID = QNetworkRequest(url)
@@ -256,13 +258,13 @@ class CaptchaGUI(QWidget):
QTimer.singleShot(1000, self.getCaptchaID)
elif content.isnumeric():
self.waitingoncaptcha = 0
- print("New Captcha:", int(content))
+ self.captchaImage.setText("Downloading new captcha.")
self.currentCaptchaID = int(content)
self.getCaptchaIMG()
else:
self.waitingoncaptcha += 1
- print("Unknown error? ID not 'NO CAPTCHA' nor number")
- print(content)
+ status = "Unknown Server response (getCaptchaID).\n"+str(content)
+ self.captchaImage.setText(status)
def getCaptchaIMG(self):
url = QUrl(self.apiurl+"action=usercaptchashow&id="+str(self.currentCaptchaID))