Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions flow/util/genMetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ def read_sdc(file_name):

def is_git_repo(folder=None):
cmd = ["git", "branch"]
if folder is not None:
return call(cmd, stderr=STDOUT, stdout=open(os.devnull, "w"), cwd=folder) == 0
else:
return call(cmd, stderr=STDOUT, stdout=open(os.devnull, "w")) == 0
with open(os.devnull, "w") as devnull:
if folder is not None:
return call(cmd, stderr=STDOUT, stdout=devnull, cwd=folder) == 0
else:
return call(cmd, stderr=STDOUT, stdout=devnull) == 0


def merge_jsons(root_path, output, files):
Expand Down