1
0
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:
Claude Paroz
2012-08-29 22:40:51 +02:00
parent 36df198e4b
commit ae88e73fa6
17 changed files with 56 additions and 56 deletions

View File

@@ -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):