Fix generate-kconfig-udlr.py for Python3

Python3 does not expose an attribute `message` on `Exception`.  However,
`Exception` can implicitly convert to a string, and produces the
message.  Switch to that.
This commit is contained in:
Kp 2022-11-13 21:17:23 +00:00
parent 211d6167b2
commit 9086327de1

View file

@ -343,7 +343,7 @@ class Main:
# show the full traceback.
if os.getenv('DXX_KCONFIG_UDLR_TRACEBACK') is not None:
raise
sys.stderr.write('error: %s\n' % e.message)
sys.stderr.write('error: {!s}\n'.format(e))
sys.exit(1)
self.write_generated_text(target,generated_text)