Handle exceptions during config file parsing
Handle uncaught exceptions during config file parsing
This commit is contained in:
parent
4e3095877f
commit
f948b4f293
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
try:
|
||||
p.read(path)
|
||||
except ConfigParser.Error as e:
|
||||
print "Error reading config file: \n%s" % e
|
||||
sys.exit(1)
|
||||
return p
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in a new issue