Try defaulting branch differently

This commit is contained in:
Christian committed 2012-12-03 22:26:12 -05:00
1 parent 9c77d3f25b
commit d3c0e1f589
1 file changed
+1 -7
+1 -7
View File
@@ -48,13 +48,7 @@ def main():
(mcpversion,mcclientversion,mcserverversion) = re.match("[.\w]+ \(data: ([.\w]+), client: ([.\w.]+), server: ([.\w.]+)\)",Commands.fullversion()).groups()
if os.getenv("GIT_BRANCH") is None:
cmd = "git rev-parse --abbrev-ref HEAD"
try:
process = subprocess.Popen(cmdsplit(cmd), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=-1)
branch, _ = process.communicate()
except OSError:
print("Git not found")
branch="none"
branch="master"
else:
branch=os.getenv("GIT_BRANCH").rpartition('/')[2]