Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Check to see that text is not None before calling replace in write(). #262

Merged
merged 1 commit into from May 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions codecov/__init__.py
Expand Up @@ -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")
Expand All @@ -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):
Expand Down