diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-18 17:24:40 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-18 17:47:02 +0100 |
| commit | 33b5e1aef6fbfc61385d31c75c151e24cf3ff5bc (patch) | |
| tree | b7931ecce53171de01baa6bf805b48c71a9d741b /kconfiglib.py | |
| parent | 8574dc519c22024041aafb400594c322036cb4e0 (diff) | |
Fix 'source "missing"' error message for Python 3
IOError() generates an OSError in Python 3.6. OSError does not have a
'message' attribute, which caused the following error when trying to add
the hint re. environment variables (the rest of the message was still
displayed):
AttributeError: 'OSError' object has no attribute 'message'
Use str(exception) instead, which seems to work for both Python 2 and
Python 3.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index b5c9e26..4df0e53 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1137,7 +1137,7 @@ class Kconfig(object): "variable FOO, but rather to the Kconfig Symbol FOO " "(which would commonly have 'option env=\"FOO\"' in " "its definition)." - .format(self._filename, self._linenr, e.message)) + .format(self._filename, self._linenr, str(e))) self._filename = filename self._linenr = 0 |
