Bug 8208 - bare metal provisioning

Add color to print text of python script
This commit is contained in:
Frank 2011-04-12 17:37:46 -07:00
parent 916117a319
commit 50b6aca738

View File

@ -99,9 +99,9 @@ def writeProgressBar(msg, result=None):
if msg is not None:
output = "%-80s"%msg
elif result is True:
output = "[%-2s]\n"%"OK"
output = "[ \033[92m%-2s\033[0m ]\n"%"OK"
elif result is False:
output = "[%-6s]\n"%"Failed"
output = "[ \033[91m%-6s\033[0m ]\n"%"FAILED"
sys.stdout.write(output)
sys.stdout.flush()