diff --git a/eve_orehold_watcher.py b/eve_orehold_watcher.py index 879aa20..5bcf0a7 100644 --- a/eve_orehold_watcher.py +++ b/eve_orehold_watcher.py @@ -68,7 +68,9 @@ def load_config(): if not os.path.exists(CONFIG_PATH): sys.exit(f"No config.ini found. Copy config.ini.example -> config.ini " f"and edit it.\n(looked in {CONFIG_PATH})") - cp = configparser.ConfigParser() + # inline_comment_prefixes: strip ' ; comment' after values, else getint() crashes + # on lines like "poll_secs = 10 ; how often" (config.ini.example has these). + cp = configparser.ConfigParser(inline_comment_prefixes=(";",)) cp.read(CONFIG_PATH, encoding="utf-8-sig") # tolerate a UTF-8 BOM return cp