diff --git a/v2config.py b/v2config.py index 211d4b9..3797e72 100644 --- a/v2config.py +++ b/v2config.py @@ -19,15 +19,15 @@ def optionxform(self, optionstr): try: self.config.read(file, encoding='UTF-8') except Exception as e: - QMessageBox.critical(QWidget(), 'Read Error', str(e)) + QMessageBox.critical(QWidget(), 'Critical', repr(e)) subprocess.run(["open", file]) sys.exit(1) def get_items(self, section): try: return self.config[section].items() - except KeyError as e: - QMessageBox.critical(QWidget(), 'Key Error', 'Key Error: ' + str(e) + ' in file: ' + self.file) + except Exception as e: + QMessageBox.critical(QWidget(), 'Critical', repr(e) + ' in file: ' + self.file) subprocess.run(["open", self.file]) sys.exit(1) diff --git a/v2net.py b/v2net.py index d3c0810..c16e43e 100755 --- a/v2net.py +++ b/v2net.py @@ -69,7 +69,7 @@ # Global vars selected = {x: SETTING.get('Global', x) for x in ('proxy', 'bypass', 'capture')} -system = True if SETTING.get('Global', 'system', 'false').strip().lower() == 'true' else False +system = SETTING.get('Global', 'system', 'false').strip().lower() == 'true' http_port = '' socks5_port = '' current = {x: None for x in ('proxy', 'bypass', 'capture')}