diff --git a/watcher_dashboard/content/action_plans/views.py b/watcher_dashboard/content/action_plans/views.py index 77168fe..b97804b 100644 --- a/watcher_dashboard/content/action_plans/views.py +++ b/watcher_dashboard/content/action_plans/views.py @@ -109,7 +109,7 @@ class DetailView(horizon.tables.MultiTableView): except Exception as exc: LOG.exception(exc) actions = [] - msg = _('Action list can not be retrieved: %s') % str(exc) + msg = _('Action list can not be retrieved.') horizon.exceptions.handle(self.request, msg) return actions diff --git a/watcher_dashboard/content/actions/views.py b/watcher_dashboard/content/actions/views.py index 91b011a..d2e19ce 100644 --- a/watcher_dashboard/content/actions/views.py +++ b/watcher_dashboard/content/actions/views.py @@ -42,10 +42,10 @@ class IndexView(horizon.tables.DataTableView): search_opts = self.get_filters() try: actions = watcher.Action.list(self.request, **search_opts) - except Exception as e: + except Exception: horizon.exceptions.handle( self.request, - _("Unable to retrieve action information: %s") % str(e)) + _("Unable to retrieve action information.")) return actions def get_actions_count(self): diff --git a/watcher_dashboard/content/audit_templates/forms.py b/watcher_dashboard/content/audit_templates/forms.py index b68c7f0..55fa36d 100644 --- a/watcher_dashboard/content/audit_templates/forms.py +++ b/watcher_dashboard/content/audit_templates/forms.py @@ -131,7 +131,7 @@ class CreateForm(forms.SelfHandlingForm): messages.success(request, message) return audit_tpl except Exception as exc: - msg = _('Failed to create audit template: %s') % str(exc) + msg = _('Failed to create audit template.') LOG.info(exc) redirect = reverse(self.failure_url) exceptions.handle(request, msg, redirect=redirect) diff --git a/watcher_dashboard/content/audit_templates/views.py b/watcher_dashboard/content/audit_templates/views.py index 7e3069a..249882f 100644 --- a/watcher_dashboard/content/audit_templates/views.py +++ b/watcher_dashboard/content/audit_templates/views.py @@ -52,8 +52,7 @@ class IndexView(horizon.tables.DataTableView): LOG.exception(exc) horizon.exceptions.handle( self.request, - _("Unable to retrieve audit template " - "information: %s") % str(exc)) + _("Unable to retrieve audit template information.")) return audit_templates def get_count(self): @@ -118,7 +117,7 @@ class DetailView(horizon.tabs.TabbedTableView): except Exception as exc: LOG.exception(exc) audits = [] - msg = _('Audits list cannot be retrieved: %s') % str(exc) + msg = _('Audits list cannot be retrieved.') horizon.exceptions.handle(self.request, msg) return audits diff --git a/watcher_dashboard/content/audits/views.py b/watcher_dashboard/content/audits/views.py index 0047065..69ca509 100644 --- a/watcher_dashboard/content/audits/views.py +++ b/watcher_dashboard/content/audits/views.py @@ -56,10 +56,10 @@ class IndexView(horizon.tables.DataTableView): search_opts = self.get_filters() try: audits = watcher.Audit.list(self.request, **search_opts) - except Exception as e: + except Exception: horizon.exceptions.handle( self.request, - _("Unable to retrieve audit information: %s") % str(e)) + _("Unable to retrieve audit information.")) return audits def get_audits_count(self): @@ -117,7 +117,7 @@ class DetailView(horizon.tables.MultiTableView): except Exception as exc: LOG.exception(exc) audits = [] - msg = _('Action plan list cannot be retrieved: %s') % str(exc) + msg = _('Action plan list cannot be retrieved.') horizon.exceptions.handle(self.request, msg) return audits diff --git a/watcher_dashboard/content/goals/views.py b/watcher_dashboard/content/goals/views.py index a673322..78d0363 100644 --- a/watcher_dashboard/content/goals/views.py +++ b/watcher_dashboard/content/goals/views.py @@ -45,10 +45,10 @@ class IndexView(horizon.tables.DataTableView): search_opts = self.get_filters() try: goals = watcher.Goal.list(self.request, **search_opts) - except Exception as e: + except Exception: horizon.exceptions.handle( self.request, - _("Unable to retrieve goal information: %s") % str(e)) + _("Unable to retrieve goal information.")) return goals def get_goals_count(self): @@ -97,7 +97,7 @@ class DetailView(horizon.tables.MultiTableView): except Exception as exc: LOG.exception(exc) strategies = [] - msg = _('Strategy list cannot be retrieved: %s') % str(exc) + msg = _('Strategy list cannot be retrieved.') horizon.exceptions.handle(self.request, msg) return strategies @@ -110,8 +110,7 @@ class DetailView(horizon.tables.MultiTableView): except Exception as exc: LOG.exception(exc) indicators_spec = [] - msg = _('Efficacy specification cannot be ' - 'retrieved: %s') % str(exc) + msg = _('Efficacy specification cannot be retrieved.') horizon.exceptions.handle(self.request, msg) return indicators_spec diff --git a/watcher_dashboard/content/strategies/views.py b/watcher_dashboard/content/strategies/views.py index 3ec254b..33b895c 100644 --- a/watcher_dashboard/content/strategies/views.py +++ b/watcher_dashboard/content/strategies/views.py @@ -48,7 +48,7 @@ class IndexView(horizon.tables.DataTableView): LOG.exception(exc) horizon.exceptions.handle( self.request, - _("Unable to retrieve strategy information: %s") % str(exc)) + _("Unable to retrieve strategy information.")) return strategies def get_strategies_count(self):