1
0
Fork 0

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
Corey Shields 2019-07-13 14:46:16 -04:00
parent a8a0dc4aa6
commit ec07c59263
2 changed files with 2 additions and 4 deletions

View File

@ -17,8 +17,6 @@ disable=
R0914,
R0915,
R1705,
W0110,
W0150,
W0201,
W0221,
W0223,

View File

@ -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