[yum-commits] Branch 'yum-3_2_X' - output.py

James Antill james at osuosl.org
Thu Jun 18 15:41:42 UTC 2009


 output.py |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 86d3ee60e1d067cd3eeb1aff436502e638f66fdd
Author: James Antill <james at and.org>
Date:   Thu Jun 18 11:39:29 2009 -0400

    Reset the colours to blank, when we turn color off

diff --git a/output.py b/output.py
index 9456df1..3efccf2 100755
--- a/output.py
+++ b/output.py
@@ -141,10 +141,6 @@ class YumTerm:
         self.BG_COLOR = self.__ansi_forced_BG_COLOR
 
     def reinit(self, term_stream=None, color='auto'):
-        if color == 'never':
-            self.__enabled = False
-            return
-
         self.__enabled = True
         if not hasattr(urlgrabber.progress, 'terminal_width_cached'):
             self.columns = 80
@@ -153,7 +149,6 @@ class YumTerm:
         if color == 'always':
             self.__forced_init()
             return
-        assert color == 'auto'
 
         # Output modes:
         self.MODE = {
@@ -188,6 +183,11 @@ class YumTerm:
             'white' : ''
             }
 
+        if color == 'never':
+            self.__enabled = False
+            return
+        assert color == 'auto'
+
         # Curses isn't available on all platforms
         try:
             import curses


More information about the Yum-commits mailing list