diff options
author | André Glüpker <git@wgmd.de> | 2016-03-18 16:38:04 +0100 |
---|---|---|
committer | André Glüpker <git@wgmd.de> | 2016-03-18 16:38:04 +0100 |
commit | 3a5611e331839a3903bf0d492cbb2db5c9db5741 (patch) | |
tree | cda9e1f679fbf7f8bff9a2b015a718f5a544adfe | |
parent | 6c387ca78760b374412f56782c821a02f2a11d61 (diff) | |
download | 9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.tar.gz 9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.tar.bz2 9kwpyqt-3a5611e331839a3903bf0d492cbb2db5c9db5741.zip |
Show a warning if the API_KEY is not set
-rwxr-xr-x | 9kwpyqt.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |