Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed unneeded use of `len()` in a couple expressions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6483 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5f9821a5d012f8627330aba3f565fe5d69d18c86 1 parent fd292d3
Gary Wilson Jr. authored October 13, 2007
2  django/core/management/base.py
@@ -161,7 +161,7 @@ class NoArgsCommand(BaseCommand):
161 161
     args = ''
162 162
 
163 163
     def handle(self, *args, **options):
164  
-        if len(args) != 0:
  164
+        if args:
165 165
             raise CommandError("Command doesn't accept any arguments")
166 166
         return self.handle_noargs(**options)
167 167
 
2  django/core/management/commands/runserver.py
@@ -20,7 +20,7 @@ def handle(self, addrport='', *args, **options):
20 20
         import django
21 21
         from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
22 22
         from django.core.handlers.wsgi import WSGIHandler
23  
-        if len(args) != 0:
  23
+        if args:
24 24
             raise CommandError('Usage is runserver %s' % self.args)
25 25
         if not addrport:
26 26
             addr = ''

0 notes on commit 5f9821a

Please sign in to comment.
Something went wrong with that request. Please try again.