[PATCH 07/13] trivial: Use implicit true/false for comparison
Stephen Finucane
stephenfinucane at hotmail.com
Tue Sep 20 08:38:55 AEST 2016
Signed-off-by: Stephen Finucane <stephenfinucane at hotmail.com>
---
patchwork/templatetags/listurl.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/patchwork/templatetags/listurl.py b/patchwork/templatetags/listurl.py
index eea788e..f5a1b1c 100644
--- a/patchwork/templatetags/listurl.py
+++ b/patchwork/templatetags/listurl.py
@@ -81,7 +81,7 @@ class ListURLNode(template.defaulttags.URLNode):
@register.tag
def listurl(parser, token):
bits = token.contents.split(' ', 1)
- if len(bits) < 1:
+ if not bits:
raise template.TemplateSyntaxError(
"'%s' takes at least one argument (path to a view)" % bits[0])
kwargs = {}
--
2.7.4
More information about the Patchwork
mailing list