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
This commit is contained in:
parent
fd292d340e
commit
5f9821a5d0
|
@ -161,7 +161,7 @@ class NoArgsCommand(BaseCommand):
|
||||||
args = ''
|
args = ''
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
if len(args) != 0:
|
if args:
|
||||||
raise CommandError("Command doesn't accept any arguments")
|
raise CommandError("Command doesn't accept any arguments")
|
||||||
return self.handle_noargs(**options)
|
return self.handle_noargs(**options)
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class Command(BaseCommand):
|
||||||
import django
|
import django
|
||||||
from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
|
from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
|
||||||
from django.core.handlers.wsgi import WSGIHandler
|
from django.core.handlers.wsgi import WSGIHandler
|
||||||
if len(args) != 0:
|
if args:
|
||||||
raise CommandError('Usage is runserver %s' % self.args)
|
raise CommandError('Usage is runserver %s' % self.args)
|
||||||
if not addrport:
|
if not addrport:
|
||||||
addr = ''
|
addr = ''
|
||||||
|
|
Loading…
Reference in New Issue