Changes between Initial Version and Version 1 of Ticket #24068


Ignore:
Timestamp:
Jan 1, 2015, 7:54:48 AM (10 years ago)
Author:
Markus Holtermann
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24068

    • Property Needs tests set
    • Property Owner changed from nobody to Markus Holtermann
    • Property Status newassigned
  • Ticket #24068 – Description

    initial v1  
    1616{{{#!diff
    1717diff --git a/django/core/management/base.py b/django/core/management/base.py
    18 index 869a11b..e29bb8a 100644
     18index 869a11b..dc22d74 100644
    1919--- a/django/core/management/base.py
    2020+++ b/django/core/management/base.py
    21 @@ -107,11 +107,12 @@ class OutputWrapper(object):
     21@@ -107,11 +107,13 @@ class OutputWrapper(object):
    2222         return getattr(self._out, name)
    2323
    2424     def write(self, msg, style_func=None, ending=None):
    25 +        style_func = style_func or self.style_func
    26          ending = self.ending if ending is None else ending
    27 +        msg = force_str(style_func(msg))
    28          if ending and not msg.endswith(ending):
    29              msg += ending
    30 -        style_func = style_func or self.style_func
     25-        ending = self.ending if ending is None else ending
     26-        if ending and not msg.endswith(ending):
     27-            msg += ending
     28         style_func = style_func or self.style_func
    3129-        self._out.write(force_str(style_func(msg)))
     30+        ending = self.ending if ending is None else ending
     31+        if ending:
     32+            if msg.endswith(ending):
     33+                msg = msg[:-len(ending)]
     34+        msg = force_str(style_func(msg)) + ending
    3235+        self._out.write(msg)
    3336
Back to Top