summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-10-13 18:45:49 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-10-13 18:45:49 +0000
commit5f9821a5d012f8627330aba3f565fe5d69d18c86 (patch)
tree5e6e4cc842db04bc2cb17de9513e7fffce173b80
parentfd292d340eb545a086205aec4d5067c0ba7769ac (diff)
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
-rw-r--r--django/core/management/base.py2
-rw-r--r--django/core/management/commands/runserver.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/base.py b/django/core/management/base.py
index 7a06b86936..0c458126e8 100644
--- a/django/core/management/base.py
+++ b/django/core/management/base.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)
diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index 5b141d03ed..12808bcaad 100644
--- a/django/core/management/commands/runserver.py
+++ b/django/core/management/commands/runserver.py
@@ -20,7 +20,7 @@ class Command(BaseCommand):
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 = ''