diff --git a/codecov/__init__.py b/codecov/__init__.py index 42e38aa6..e04bbb1d 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -134,7 +134,7 @@ def sanitize_arg(replacement, arg): def write(text, color=None): global COLOR - if COLOR: + if text and COLOR: text = text.replace("==>", "\033[90m==>\033[0m") text = text.replace(" +", " \033[32m+\033[0m") text = text.replace("XX>", "\033[31mXX>\033[0m") @@ -161,7 +161,8 @@ def write(text, color=None): elif color == "green": text = "\033[92m%s\033[0m" % text - sys.stdout.write(text + "\n") + if text: + sys.stdout.write(text + "\n") def fopen(path):