Renamed 'args' variables in django.core.management to 'argv' to be more clear, and removed an unneeded import

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-09-11 02:49:07 +00:00
parent 12146f34fd
commit c554858f6b
2 changed files with 5 additions and 6 deletions

View File

@ -2,7 +2,6 @@ import django
from optparse import OptionParser from optparse import OptionParser
import os import os
import sys import sys
import textwrap
# For backwards compatibility: get_version() used to be in this module. # For backwards compatibility: get_version() used to be in this module.
get_version = django.get_version get_version = django.get_version

View File

@ -49,13 +49,13 @@ class BaseCommand(object):
version=self.get_version(), version=self.get_version(),
option_list=self.option_list) option_list=self.option_list)
def print_help(self, args): def print_help(self, argv):
parser = self.create_parser(args[0]) parser = self.create_parser(argv[0])
parser.print_help() parser.print_help()
def run(self, args): def run(self, argv):
parser = self.create_parser(args[0]) parser = self.create_parser(argv[0])
(options, args) = parser.parse_args(args[1:]) options, args = parser.parse_args(argv[1:])
if options.settings: if options.settings:
os.environ['DJANGO_SETTINGS_MODULE'] = options.settings os.environ['DJANGO_SETTINGS_MODULE'] = options.settings
if options.pythonpath: if options.pythonpath: