Skip to content

Commit 50b6aca

Browse files
committed
Bug 8208 - bare metal provisioning
Add color to print text of python script
1 parent 916117a commit 50b6aca

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

python/bindir/cloud-setup-baremetal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def initLoging(logFile=None):
9595
except:
9696
logging.basicConfig(level=logging.DEBUG)
9797

98-
def writeProgressBar(msg, result=None):
98+
def writeProgressBar(msg, result=None):
9999
if msg is not None:
100100
output = "%-80s"%msg
101101
elif result is True:
102-
output = "[%-2s]\n"%"OK"
102+
output = "[ \033[92m%-2s\033[0m ]\n"%"OK"
103103
elif result is False:
104-
output = "[%-6s]\n"%"Failed"
104+
output = "[ \033[91m%-6s\033[0m ]\n"%"FAILED"
105105
sys.stdout.write(output)
106106
sys.stdout.flush()
107107

0 commit comments

Comments
 (0)