summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <johnp@remedyz.boston.redhat.com>2006-07-27 12:40:36 -0400
committerJohn Palmieri <johnp@remedyz.boston.redhat.com>2006-07-27 12:40:36 -0400
commitf5258f571de77b18354e17073d44f316d1e0af1b (patch)
tree07c1abb483d1fb10083b05dc5d0891dd01ff1487 /setup.py
parent49948f1f9554b4431d668992b4953ff09962149f (diff)
downloaddbus-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.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/setup.py b/setup.py
index 065fb4b..59a2e27 100644
--- a/setup.py
+++ b/setup.py
@@ -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()