Skip to content

Commit

Permalink
Fixed #17820 -- Fixed more occurrences of redundant handling of manag…
Browse files Browse the repository at this point in the history
…ement commands options.

They had been missen in the first attempts or had been introduced afterwards.

Refs #13760, #10080, #17799.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
ramiro committed Mar 10, 2012
1 parent 4cd9b4b commit c6425aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion django/core/management/commands/createcachetable.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Command(LabelCommand):
requires_model_validation = False

def handle_label(self, tablename, **options):
db = options.get('database', DEFAULT_DB_ALIAS)
db = options.get('database')
cache = BaseDatabaseCache(tablename, {})
if not router.allow_syncdb(db, cache.cache_model_class):
return
Expand Down
2 changes: 1 addition & 1 deletion django/core/management/commands/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def handle_app(self, app, **options):
'This command has been deprecated. The command ``flush`` can be used to delete everything. You can also use ALTER TABLE or DROP TABLE statements manually.',
DeprecationWarning
)
using = options.get('database', DEFAULT_DB_ALIAS)
using = options.get('database')
connection = connections[using]

app_name = app.__name__.split('.')[-2]
Expand Down
4 changes: 2 additions & 2 deletions django/core/management/commands/runserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def run(self, *args, **options):
"""
Runs the server, using the autoreloader if needed
"""
use_reloader = options.get('use_reloader', True)
use_reloader = options.get('use_reloader')

if use_reloader:
autoreload.main(self.inner_run, args, options)
Expand All @@ -83,7 +83,7 @@ def inner_run(self, *args, **options):
from django.conf import settings
from django.utils import translation

threading = options.get('use_threading', False)
threading = options.get('use_threading')
shutdown_message = options.get('shutdown_message', '')
quit_command = (sys.platform == 'win32') and 'CTRL-BREAK' or 'CONTROL-C'

Expand Down

0 comments on commit c6425aa

Please sign in to comment.