linting for W0150
the check_celery function returns in a finally, which is unnecessary and is an antipattern. This works just the same dropping the finally statement and returning in the end. Signed-off-by: Corey Shields <cshields@gmail.com>merge-requests/399/head
parent
a8a0dc4aa6
commit
ec07c59263
|
@ -17,8 +17,6 @@ disable=
|
|||
R0914,
|
||||
R0915,
|
||||
R1705,
|
||||
W0110,
|
||||
W0150,
|
||||
W0201,
|
||||
W0221,
|
||||
W0223,
|
||||
|
|
|
@ -69,8 +69,8 @@ class SatelliteAdmin(admin.ModelAdmin):
|
|||
messages.error(request, 'Worker timeout: %s' % error)
|
||||
else:
|
||||
messages.success(request, 'Celery is OK')
|
||||
finally:
|
||||
return HttpResponseRedirect(reverse('admin:index'))
|
||||
|
||||
return HttpResponseRedirect(reverse('admin:index'))
|
||||
|
||||
def decode_all_data(self, request, norad):
|
||||
"""Returns the admin home page, while triggering a Celery decode task
|
||||
|
|
Loading…
Reference in New Issue