diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2019-03-02 22:00:19 +0100 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2019-03-02 22:00:19 +0100 |
commit | 018bb49b20795ba9e57a9c94f361fa45b2b99e4a (patch) | |
tree | ff3bb8dd1bce78d8386d46773b302803d63f0fde | |
parent | 073a04bb6bc6555ebdafb8d18325a4a84d25b8c0 (diff) | |
download | archweb-018bb49b20795ba9e57a9c94f361fa45b2b99e4a.tar.gz archweb-018bb49b20795ba9e57a9c94f361fa45b2b99e4a.zip |
packages: use Pythonic syntax instead of len()
not foo is preferred over len(foo) == 0.
-rw-r--r-- | packages/views/display.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/views/display.py b/packages/views/display.py index a1809bb6..9b5b78c8 100644 --- a/packages/views/display.py +++ b/packages/views/display.py @@ -162,7 +162,7 @@ def group_details(request, arch, name): arches = arch_plus_agnostic(arch) pkgs = Package.objects.normal().filter( groups__name=name, arch__in=arches).order_by('pkgname') - if len(pkgs) == 0: + if not pkgs: raise Http404 context = { 'list_title': 'Group Details', |