diff options
Diffstat (limited to 'tools/util.py')
-rw-r--r-- | tools/util.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/util.py b/tools/util.py index 306f2109f..dd80ab4bd 100644 --- a/tools/util.py +++ b/tools/util.py @@ -6,6 +6,10 @@ import stat import sys import subprocess +RESET = "\x1b[0m" +FG_RED = "\x1b[31m" +FG_GREEN = "\x1b[32m" + executable_suffix = ".exe" if os.name == "nt" else "" root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) @@ -73,6 +77,14 @@ def shell_quote(arg): return quote(arg) +def red_failed(): + return "%sFAILED%s" % (FG_RED, RESET) + + +def green_ok(): + return "%sok%s" % (FG_GREEN, RESET) + + def remove_and_symlink(target, name, target_is_dir=False): try: # On Windows, directory symlink can only be removed with rmdir(). |