Commit dfc57136 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler

views/patch: Cast exception to str

This solves the following error:

File "patchwork/views/patch.py" in patch
  82.                              % (patch.name, bundle.name, ex.message)]

Exception Type: AttributeError
Exception Value: 'Exception' object has no attribute 'message'
Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent 4a20951a
Pipeline #94523 passed with stage
in 1 minute and 38 seconds
......@@ -79,7 +79,7 @@ def patch(request, patch_id):
messages += ['Patch added to bundle "%s"' % bundle.name]
except Exception as ex:
messages += ["Couldn't add patch '%s' to bundle %s: %s"
% (patch.name, bundle.name, ex.message)]
% (patch.name, bundle.name, str(ex))]
# all other actions require edit privs
elif not editable:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment