diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2019-06-09 13:54:53 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2019-06-09 14:04:38 +0200 |
| commit | 49831ddfc8610feb3979a8a72a498b1d05759453 (patch) | |
| tree | 49cfb79391d10039b5be7bfe9614a6fc823a1b9a /kconfiglib.py | |
| parent | efbf127e6150f5f2e02d3bb1dff86ef38bac4275 (diff) | |
Give the 'source ...' line being parsed when a file can't be opened
Helpful when env. variables are involved. Previously only shown when the
file couldn't be found.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index c8867da..9195055 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2076,8 +2076,9 @@ class Kconfig(object): except IOError as e: # We already know that the file exists raise _KconfigIOError( - e, "{}:{}: Could not open '{}' ({}: {})" + e, "{}:{}: Could not open '{}' (in '{}') ({}: {})" .format(self._filename, self._linenr, filename, + self._line.strip(), errno.errorcode[e.errno], e.strerror)) self._filename = rel_filename |
