Tweaked fix for refs #23946; thanks Claude.

This commit is contained in:
Tim Graham 2014-12-02 15:57:08 -05:00
parent 00fa1474d7
commit 5c773447c3
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ from django.core.servers.basehttp import run, get_internal_wsgi_application
from django.db import connections, DEFAULT_DB_ALIAS
from django.db.migrations.executor import MigrationExecutor
from django.utils import autoreload
from django.utils.encoding import get_system_encoding, smart_text
from django.utils.encoding import force_text, get_system_encoding
from django.utils import six
from django.core.exceptions import ImproperlyConfigured
@ -148,7 +148,7 @@ class Command(BaseCommand):
try:
error_text = ERRORS[e.errno]
except KeyError:
error_text = smart_text(e)
error_text = force_text(e)
self.stderr.write("Error: %s" % error_text)
# Need to use an OS exit because sys.exit doesn't work in a thread
os._exit(1)