Permalink
Browse files

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...
1 parent fd292d3 commit 5f9821a5d012f8627330aba3f565fe5d69d18c86 @gdub gdub committed Oct 13, 2007
Showing with 2 additions and 2 deletions.
  1. +1 −1 django/core/management/base.py
  2. +1 −1 django/core/management/commands/runserver.py
@@ -161,7 +161,7 @@ class NoArgsCommand(BaseCommand):
args = ''
def handle(self, *args, **options):
- if len(args) != 0:
+ if args:
raise CommandError("Command doesn't accept any arguments")
return self.handle_noargs(**options)
@@ -20,7 +20,7 @@ def handle(self, addrport='', *args, **options):
import django
from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
from django.core.handlers.wsgi import WSGIHandler
- if len(args) != 0:
+ if args:
raise CommandError('Usage is runserver %s' % self.args)
if not addrport:
addr = ''

0 comments on commit 5f9821a

Please sign in to comment.