From ec07c592632e2435806f92b7b70d342fe950a2e7 Mon Sep 17 00:00:00 2001 From: Corey Shields Date: Sat, 13 Jul 2019 14:46:16 -0400 Subject: [PATCH] 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 --- .pylintrc | 2 -- db/base/admin.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index 5ae892a..fbcc0cc 100644 --- a/.pylintrc +++ b/.pylintrc @@ -17,8 +17,6 @@ disable= R0914, R0915, R1705, - W0110, - W0150, W0201, W0221, W0223, diff --git a/db/base/admin.py b/db/base/admin.py index 43156e0..db85604 100644 --- a/db/base/admin.py +++ b/db/base/admin.py @@ -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