From 406867fab12432c11c5a4679e4ff174969b94d58 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 19 Sep 2012 13:57:57 -0400 Subject: [PATCH] pg.py: set color.USE_COLOR depending on the --color argument. Otherwise the course loading and other things that avoid use_color keyword args will end up getting printed in color by default. --- bin/pg.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/pg.py b/bin/pg.py index 17964c0..86db4a2 100755 --- a/bin/pg.py +++ b/bin/pg.py @@ -31,6 +31,7 @@ import pgp_mime as _pgp_mime from pygrader import __version__ from pygrader import LOG as _LOG +from pygrader import color as _color from pygrader.email import test_smtp as _test_smtp from pygrader.email import Responder as _Responder from pygrader.mailpipe import mailpipe as _mailpipe @@ -164,6 +165,7 @@ if __name__ == '__main__': if args.verbose: _LOG.setLevel(max(_logging.DEBUG, _LOG.level - 10*args.verbose)) _pgp_mime.LOG.setLevel(_LOG.level) + _color.USE_COLOR = args.color config = _configparser.ConfigParser() config.read([ -- 2.26.2