Skip to content
Snippets Groups Projects
Commit 7ad7f45a authored by Daniel Brown's avatar Daniel Brown
Browse files

fixing git calls so that it passes list to popen rather than string

parent df71ede4
No related branches found
No related tags found
No related merge requests found
......@@ -29,17 +29,16 @@ def runcmd(args):
def git(args, git_bin=GIT_BIN):
cmd = ""
if type(args) is list:
args.insert(0,git_bin)
cmd = " ".join(args)
else:
cmd = git_bin + " " + args
if type(args) is str:
args = args.split(" ")
elif type(args) is not list:
raise Exception("arg for utils.git must be a list or string")
print cmd
args.insert(0, git_bin)
print os.getcwd()
print "GIT CMD: " + " ".join(args), os.getcwd()
p = sub.Popen(cmd, stdout=sub.PIPE, stderr=sub.PIPE)
p = sub.Popen(args, stdout=sub.PIPE, stderr=sub.PIPE)
out, err = p.communicate()
if p.returncode != 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment