Fix portageq to handle NOCOLOR.
authorZac Medico <zmedico@gentoo.org>
Tue, 12 Oct 2010 02:29:21 +0000 (19:29 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 12 Oct 2010 02:29:21 +0000 (19:29 -0700)
bin/portageq

index d7ea72bf53c5db8ceb399528e9fc48bbb5e15942..547a70d6c6f8d78bbd4741d4d1587c5376c58358 100755 (executable)
@@ -660,6 +660,11 @@ else:
                pass
 
 def main():
+
+       nocolor = os.environ.get('NOCOLOR')
+       if nocolor in ('yes', 'true'):
+               portage.output.nocolor()
+
        if "-h" in sys.argv or "--help" in sys.argv:
                usage(sys.argv)
                sys.exit(os.EX_OK)