Skip to content

Commit

Permalink
Fixed #21856: Don't crash runserver when DATABASES = {}
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed Feb 12, 2014
1 parent 7e941ba commit f0f1ba7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django/core/management/commands/runserver.py
Expand Up @@ -14,6 +14,7 @@
from django.db.migrations.executor import MigrationExecutor from django.db.migrations.executor import MigrationExecutor
from django.utils import autoreload from django.utils import autoreload
from django.utils import six from django.utils import six
from django.core.exceptions import ImproperlyConfigured


naiveip_re = re.compile(r"""^(?: naiveip_re = re.compile(r"""^(?:
(?P<addr> (?P<addr>
Expand Down Expand Up @@ -101,7 +102,10 @@ def inner_run(self, *args, **options):


self.stdout.write("Performing system checks...\n\n") self.stdout.write("Performing system checks...\n\n")
self.validate(display_num_errors=True) self.validate(display_num_errors=True)
self.check_migrations() try:
self.check_migrations()
except ImproperlyConfigured:
pass
now = datetime.now().strftime('%B %d, %Y - %X') now = datetime.now().strftime('%B %d, %Y - %X')
if six.PY2: if six.PY2:
now = now.decode('utf-8') now = now.decode('utf-8')
Expand Down

0 comments on commit f0f1ba7

Please sign in to comment.