summaryrefslogtreecommitdiff
path: root/9kwpyqt.py
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-03-18 16:38:04 +0100
committerAndré Glüpker <git@wgmd.de>2016-03-18 16:38:04 +0100
commit3a5611e331839a3903bf0d492cbb2db5c9db5741 (patch)
treecda9e1f679fbf7f8bff9a2b015a718f5a544adfe /9kwpyqt.py
parent6c387ca78760b374412f56782c821a02f2a11d61 (diff)
download9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.tar.gz
9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.tar.bz2
9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.zip
Show a warning if the API_KEY is not set
Diffstat (limited to '9kwpyqt.py')
-rwxr-xr-x9kwpyqt.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index 9acf9eb..1539032 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -104,6 +104,11 @@ class CaptchaGUI(QWidget):
self.setLayout(mainLayout)
self.setWindowTitle("Captcha 9kw PyQt")
+ if not API_KEY:
+ self.captchaImage.setText("API_KEY is missing.\nPlease edit this file and enter your key at the top.")
+ self.startstopButton.setEnabled(False)
+ return
+
# load soundfile
self.sound = QSound(soundfile)