Skip to content

Commit

Permalink
fixes ticket #142
Browse files Browse the repository at this point in the history
  • Loading branch information
kaazoo committed Sep 17, 2010
1 parent 1032348 commit 9c8a5eb
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,18 @@ def copy_with_clean(src_files,dest_files,dest_path,env):
return rlist

def get_git_commit():
try:
gitlog = subprocess.Popen(["git", "show", "--abbrev-commit"], stdout=subprocess.PIPE)
except OSError:
print("Not a Git repository. Can't fetch commit id.")
commit_string = ""
else:
commit_string = gitlog.communicate()[0].split("\n")[0].split(" ")[1]
print("Current Git commit id is: "+commit_string)
return commit_string
try:
gitlog = subprocess.Popen(["git", "show", "--abbrev-commit"], stdout=subprocess.PIPE)
except OSError:
commit_string = ""
else:
if gitlog.poll() != "0":
print("Not a Git repository. Can't fetch commit id.")
commit_string = ""
else:
commit_string = gitlog.communicate()[0].split("\n")[0].split(" ")[1]
print("Current Git commit id is: "+commit_string)
return commit_string

def write_git_rev(commit_id):
os.chdir("libdrqueue")
Expand Down

0 comments on commit 9c8a5eb

Please sign in to comment.