Catch ValueError when reading config

This commit is contained in:
Florian Bruhin 2014-05-01 19:57:14 +02:00
parent 53464dcbab
commit af6f6b99e9
2 changed files with 2 additions and 2 deletions

1
TODO
View File

@ -2,7 +2,6 @@ Bugs
====
All kind of FIXMEs
Catch ValueError for invalid interpolations when reading config
Display untransformed values for get
Style

View File

@ -112,7 +112,8 @@ class QuteBrowser(QApplication):
configparser.InterpolationError,
configparser.DuplicateSectionError,
configparser.DuplicateOptionError,
configparser.ParsingError) as e:
configparser.ParsingError,
ValueError) as e:
errstr = "Error while reading config:"
if hasattr(e, 'section') and hasattr(e, 'option'):
errstr += "\n\n{} -> {}:".format(e.section, e.option)