package: Fix showing error during pre/post install

When an ActionError is raised during pre_install or on_install action,
the error is not being shown.  Instead an error is being raised.  This
fixes that.
This commit is contained in:
Sunil Mohan Adapa 2015-08-18 21:23:02 +05:30
parent 2879c9cedb
commit b4c487f520

View File

@ -263,7 +263,8 @@ def _should_show_install_view(request, package_names):
return False
else:
messages.error(request, _('Error installing packages: {details}')
.format(details=exception.error_string))
.format(details=getattr(exception, 'error_string',
str(exception))))
return True