Commit f44957de by James Cammarata

Merge pull request #8818 from Erethon/devel

Handle exceptions during config file parsing
parents 35dfbff2 f948b4f2
......@@ -71,7 +71,11 @@ def load_config_file():
for path in [path0, path1, path2, path3]:
if path is not None and os.path.exists(path):
p.read(path)
try:
p.read(path)
except ConfigParser.Error as e:
print "Error reading config file: \n%s" % e
sys.exit(1)
return p
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment