diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-11 03:43:04 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-11 03:43:04 +0100 |
| commit | a543a08f1daf3bf6716d813ff94c97c8e1eec824 (patch) | |
| tree | 1c6ee005c4bcb911620b4573be787b16c53f7221 /kconfiglib.py | |
| parent | ef82de0d1cb0c89d139d2b08e7c8ec85abfb6111 (diff) | |
Make 'source' error message more informative.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 7950bad..e1c4baa 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1065,15 +1065,18 @@ class Config(): elif t0 == T_SOURCE: kconfig_file = tokens.get_next() - f = os.path.join(self.base_dir, self._expand_sym_refs(kconfig_file)) + exp_kconfig_file = self._expand_sym_refs(kconfig_file) + f = os.path.join(self.base_dir, exp_kconfig_file) if not os.path.exists(f): - raise IOError, ('{0}:{1}: sourced file "{2}" not found. Perhaps ' - 'base_dir (argument to Config.__init__(), currently ' + raise IOError, ('{0}:{1}: sourced file "{2}" (expands to\n' + '"{3}") not found. Perhaps base_dir\n' + '(argument to Config.__init__(), currently\n' '"{3}") is set to the wrong value.' .format(filename, linenr, kconfig_file, + exp_kconfig_file, self.base_dir)) # Add items to the same block |
