More generic changes from 2to3

This commit is contained in:
Magnus Hagander
2019-01-21 10:42:05 +01:00
parent 9875fd8537
commit a10eb6420b
18 changed files with 37 additions and 40 deletions

View File

@ -291,7 +291,7 @@ def admin_purge(request):
url = request.POST['url']
expr = request.POST['expr']
xkey = request.POST['xkey']
l = len(filter(None, [url, expr, xkey]))
l = len([_f for _f in [url, expr, xkey] if _f])
if l == 0:
# Nothing specified
return HttpResponseRedirect('.')