mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
This commit is contained in:
@@ -12,7 +12,7 @@ import traceback
|
||||
import django
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.core.management.color import color_style
|
||||
from django.utils.encoding import smart_str
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.six import StringIO
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class OutputWrapper(object):
|
||||
msg += ending
|
||||
style_func = [f for f in (style_func, self.style_func, lambda x:x)
|
||||
if f is not None][0]
|
||||
self._out.write(smart_str(style_func(msg)))
|
||||
self._out.write(force_str(style_func(msg)))
|
||||
|
||||
|
||||
class BaseCommand(object):
|
||||
|
||||
Reference in New Issue
Block a user