From: W. Trevor King Date: Wed, 19 Sep 2012 17:57:57 +0000 (-0400) Subject: pg.py: set color.USE_COLOR depending on the --color argument. X-Git-Url: http://git.tremily.us/?p=pygrader.git;a=commitdiff_plain;h=406867fab12432c11c5a4679e4ff174969b94d58 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. --- 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([