diff options
Diffstat (limited to '9kwpyqt.py')
-rwxr-xr-x | 9kwpyqt.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -337,7 +337,8 @@ class CaptchaGUI(QWidget): defaultconfig['Autostart'] = 'no' self.config = configparser.ConfigParser(defaultconfig) try: - self.config.read_file(open('9kwpyqt.ini')) + with open('9kwpyqt.ini') as configfile: + self.config.read_file(configfile) except FileNotFoundError: self.writeConfig() return False |