From 33b5e1aef6fbfc61385d31c75c151e24cf3ff5bc Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 18 Jan 2018 17:24:40 +0100 Subject: 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. --- kconfiglib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3