Merge "Except block now covers specific errors"

This commit is contained in:
Zuul 2021-04-27 13:07:01 +00:00 committed by Gerrit Code Review
commit f4e8ada922
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def get_result(path, section, key, default=None):
try:
config.read(path)
except Exception:
except (OSError, ConfigParser.ParsingError):
msg = "The file '{}' is not in a valid INI format.".format(path)
ret = ReturnValue.INVALID_FORMAT
return (ret, msg, value)