mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Don't use escape sequences if being redirected.
This commit is contained in:
parent
10014fd23d
commit
04878cdb72
1 changed files with 10 additions and 4 deletions
|
|
@ -249,10 +249,16 @@ for test in tests:
|
|||
print('\n' + '='*54)
|
||||
print('Summary of Compilation Option Testing:\n')
|
||||
|
||||
OK = '\033[92m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
BOLD = '\033[1m'
|
||||
if sys.stdout.isatty():
|
||||
OK = '\033[92m'
|
||||
FAIL = '\033[91m'
|
||||
ENDC = '\033[0m'
|
||||
BOLD = '\033[1m'
|
||||
else:
|
||||
OK = ''
|
||||
FAIL = ''
|
||||
ENDC = ''
|
||||
BOLD = ''
|
||||
|
||||
for test in tests:
|
||||
print(test + '.'*(50 - len(test)), end='')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue