mirror of https://gitlab.com/ita1024/waf.git
Merge branch 'color-gcc-fix-2' into 'master'
color_gcc: Check that cmd has elements in it before processing it. See merge request ita1024/waf!2327
This commit is contained in:
commit
3536dfecf8
|
@ -19,7 +19,7 @@ class ColorGCCFormatter(Logs.formatter):
|
|||
func = frame.f_code.co_name
|
||||
if func == 'exec_command':
|
||||
cmd = frame.f_locals.get('cmd')
|
||||
if isinstance(cmd, list) and ('gcc' in cmd[0] or 'g++' in cmd[0]):
|
||||
if isinstance(cmd, list) and (len(cmd) > 0) and ('gcc' in cmd[0] or 'g++' in cmd[0]):
|
||||
lines = []
|
||||
for line in rec.msg.splitlines():
|
||||
if 'warning: ' in line:
|
||||
|
|
Loading…
Reference in New Issue