diff options
author | John (J5) Palmieri <johnp@remedyz.boston.redhat.com> | 2006-07-27 12:40:36 -0400 |
---|---|---|
committer | John Palmieri <johnp@remedyz.boston.redhat.com> | 2006-07-27 12:40:36 -0400 |
commit | f5258f571de77b18354e17073d44f316d1e0af1b (patch) | |
tree | 07c1abb483d1fb10083b05dc5d0891dd01ff1487 /setup.py | |
parent | 49948f1f9554b4431d668992b4953ff09962149f (diff) | |
download | dbus-python-f5258f571de77b18354e17073d44f316d1e0af1b.tar.gz |
* setup.py: some distros have older gits which don't have the git-log --stat
flag. We check for an error and if so revert to just calling git-log
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -54,17 +54,27 @@ dbus_glib_includes.extend([ x.replace("-I", "") for x in output.split() ]) #create ChangeLog only if this is a git repo if os.path.exists(".git"): + pipe = "" pipe = os.popen3("git-log --stat") - output = pipe[1].read().strip() + error = pipe[2].read().strip() + if error: + for p in pipe: + p.close() + + pipe = os.popen3("git-log") + error = pipe[2].read().strip() + + if error: + print "ERROR: running git-log (%s)" % (error) + raise SystemExit + + output = pipe[1].read().strip() + for p in pipe: p.close() - if error: - print "ERROR: running git-log (%s)" % (error) - raise SystemExit - file = open("ChangeLog", "w") file.writelines(output) file.close() |