From 5f9821a5d012f8627330aba3f565fe5d69d18c86 Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sat, 13 Oct 2007 18:45:49 +0000 Subject: [PATCH] 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 --- django/core/management/base.py | 2 +- django/core/management/commands/runserver.py | 2 +- 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 = ''