Merge "Fix local variable is assigned to but never used"
This commit is contained in:
commit
adf77a5440
@ -52,7 +52,7 @@ class IndexView(tables.DataTableView):
|
|||||||
paginator = Paginator(results, limit)
|
paginator = Paginator(results, limit)
|
||||||
results = paginator.page(1)
|
results = paginator.page(1)
|
||||||
except EmptyPage:
|
except EmptyPage:
|
||||||
contacts = paginator.page(paginator.num_pages)
|
results = paginator.page(paginator.num_pages)
|
||||||
except Exception:
|
except Exception:
|
||||||
messages.error(self.request, _("Could not retrieve alarm definitions"))
|
messages.error(self.request, _("Could not retrieve alarm definitions"))
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class SetAlarmDefinitionExpressionAction(workflows.Action):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.fields['expression'].metrics = ad_forms._get_metrics(request)
|
self.fields['expression'].metrics = ad_forms._get_metrics(request)
|
||||||
except Exception as ex:
|
except Exception:
|
||||||
exceptions.handle(request, _('Unable to retrieve metrics'))
|
exceptions.handle(request, _('Unable to retrieve metrics'))
|
||||||
|
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ class AlarmServiceView(tables.DataTableView):
|
|||||||
try:
|
try:
|
||||||
name, value = self.service.split("=")
|
name, value = self.service.split("=")
|
||||||
results = [api.monitor.alarm_show(self.request, value)]
|
results = [api.monitor.alarm_show(self.request, value)]
|
||||||
except Exception as e:
|
except Exception:
|
||||||
messages.error(self.request, _("Could not retrieve alarms"))
|
messages.error(self.request, _("Could not retrieve alarms"))
|
||||||
results = []
|
results = []
|
||||||
else:
|
else:
|
||||||
|
@ -49,7 +49,7 @@ class IndexView(tables.DataTableView):
|
|||||||
paginator = Paginator(results, LIMIT)
|
paginator = Paginator(results, LIMIT)
|
||||||
results = paginator.page(1)
|
results = paginator.page(1)
|
||||||
except EmptyPage:
|
except EmptyPage:
|
||||||
contacts = paginator.page(paginator.num_pages)
|
results = paginator.page(paginator.num_pages)
|
||||||
except Exception:
|
except Exception:
|
||||||
messages.error(self.request, _("Could not retrieve notifications"))
|
messages.error(self.request, _("Could not retrieve notifications"))
|
||||||
return results
|
return results
|
||||||
|
3
tox.ini
3
tox.ini
@ -29,7 +29,6 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_templ
|
|||||||
# E127 continuation line over-indented for visual indent
|
# E127 continuation line over-indented for visual indent
|
||||||
# E128 continuation line under-indented for visual indent
|
# E128 continuation line under-indented for visual indent
|
||||||
# E501 line too long
|
# E501 line too long
|
||||||
# F841 local variable is assigned to but never used
|
|
||||||
# H102 Apache 2.0 license header not found
|
# H102 Apache 2.0 license header not found
|
||||||
# H238 old style class declaration, use new style
|
# H238 old style class declaration, use new style
|
||||||
# H301 one import per line
|
# H301 one import per line
|
||||||
@ -39,4 +38,4 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,panel_template,dash_templ
|
|||||||
# H405 multi line docstring summary not separated with an empty line
|
# H405 multi line docstring summary not separated with an empty line
|
||||||
# H803 git commit title should not end with period (disabled on purpose, see bug #1236621)
|
# H803 git commit title should not end with period (disabled on purpose, see bug #1236621)
|
||||||
# H904 Wrap long lines in parentheses instead of a backslash
|
# H904 Wrap long lines in parentheses instead of a backslash
|
||||||
ignore = E127,E128,E501,F841,H102,H238,H301,H305,H306,H307,H405,H803,H904
|
ignore = E127,E128,E501,H102,H238,H301,H305,H306,H307,H405,H803,H904
|
||||||
|
Loading…
x
Reference in New Issue
Block a user