publish eve_orehold_watcher.py
This commit is contained in:
parent
1d132ed2a0
commit
580eb90865
1 changed files with 3 additions and 1 deletions
|
|
@ -68,7 +68,9 @@ def load_config():
|
||||||
if not os.path.exists(CONFIG_PATH):
|
if not os.path.exists(CONFIG_PATH):
|
||||||
sys.exit(f"No config.ini found. Copy config.ini.example -> config.ini "
|
sys.exit(f"No config.ini found. Copy config.ini.example -> config.ini "
|
||||||
f"and edit it.\n(looked in {CONFIG_PATH})")
|
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
|
cp.read(CONFIG_PATH, encoding="utf-8-sig") # tolerate a UTF-8 BOM
|
||||||
return cp
|
return cp
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue