mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-07 05:58:00 +03:00
3f5629302a
Python 3.5 in F24 was throwing the following exception: Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/lvmdbusd/main.py", line 73, in process_request req.run_cmd() File "/usr/lib/python3.5/site-packages/lvmdbusd/request.py", line 73, in run_cmd self.register_error(-1, st) File "/usr/lib/python3.5/site-packages/lvmdbusd/request.py", line 123, in register_error self._reg_ending(None, error_rc, error) File "/usr/lib/python3.5/site-packages/lvmdbusd/request.py", line 115, in _reg_ending self.cb_error(self._rc_error) File "/usr/lib64/python3.5/site-packages/dbus/service.py", line 669, in <lambda> keywords[error_callback] = lambda exception: _method_reply_error(connection, message, exception) File "/usr/lib64/python3.5/site-packages/dbus/service.py", line 293, in _method_reply_error exception)) File "/usr/lib64/python3.5/traceback.py", line 136, in format_exception_only return list(TracebackException(etype, value, None).format_exception_only()) File "/usr/lib64/python3.5/traceback.py", line 442, in __init__ if (exc_value and exc_value.__cause__ is not None AttributeError: 'str' object has no attribute '__cause__' This was caused because we were calling the dbus error callback with a string instead of an actual exception. On python 3.4 this was apparently OK, but not with 3.5. Corrected to pass the exception to error callback. Change tested on both python 3.4 and 3.5. Reported-by: Vratislav Podzimek <vpodzime@redhat.com> Signed-off-by: Tony Asleson <tasleson@redhat.com>