From b4c487f520bf11233bd0d9a81ee3bd4e7f9c1687 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 18 Aug 2015 21:23:02 +0530 Subject: [PATCH] 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. --- plinth/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/package.py b/plinth/package.py index 92c968f29..2c7b6d91a 100644 --- a/plinth/package.py +++ b/plinth/package.py @@ -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