Bug #204651 - Make repoman respect NOCOLOR=true. (trunk r9151)
authorZac Medico <zmedico@gentoo.org>
Sun, 6 Jan 2008 20:25:17 +0000 (20:25 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 6 Jan 2008 20:25:17 +0000 (20:25 -0000)
svn path=/main/branches/2.1.2/; revision=9152

bin/repoman

index 6e1a83b52590383a44b2868308714f5a15b9fe65..b4b64827140a87e845533396941971e7914376d3 100755 (executable)
@@ -63,6 +63,7 @@ from portage_manifest import Manifest
 from portage_exception import ParseError
 from portage_exec import find_binary, spawn
 
+import output
 from output import bold, create_color_func, darkgreen, \
        green, nocolor, red, turquoise, yellow
 
@@ -403,7 +404,7 @@ class ConsoleStyleFile(object):
                self._styles = styles
 
        def write(self, s):
-               if self._styles:
+               if output.havecolor and self._styles:
                        for style in self._styles:
                                self._file.write(self._codes[style])
                        self._file.write(s)