diff options
Diffstat (limited to 'third_party/waf/waflib/extras/color_gcc.py')
-rw-r--r-- | third_party/waf/waflib/extras/color_gcc.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/waf/waflib/extras/color_gcc.py b/third_party/waf/waflib/extras/color_gcc.py index b3587e8db44..73b001768c5 100644 --- a/third_party/waf/waflib/extras/color_gcc.py +++ b/third_party/waf/waflib/extras/color_gcc.py @@ -1,3 +1,7 @@ +#! /usr/bin/env python +# encoding: utf-8 +# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file + #!/usr/bin/env python # encoding: utf-8 @@ -18,7 +22,7 @@ class ColorGCCFormatter(Logs.formatter): while frame: func = frame.f_code.co_name if func == 'exec_command': - cmd = frame.f_locals['cmd'] + cmd = frame.f_locals.get('cmd') if isinstance(cmd, list) and ('gcc' in cmd[0] or 'g++' in cmd[0]): lines = [] for line in rec.msg.splitlines(): @@ -36,3 +40,4 @@ class ColorGCCFormatter(Logs.formatter): def options(opt): Logs.log.handlers[0].setFormatter(ColorGCCFormatter(Logs.colors)) + |