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 = ''