From 67ba4cd7b5bc5e834db3106b3081677ee70d18f7 Mon Sep 17 00:00:00 2001 From: Josh Date: Sun, 18 Mar 2012 21:30:36 -0400 Subject: [PATCH] add code to handle older version of GitPython --- scripts/builder/repository.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index 0045de7..a47e249 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py @@ -56,11 +56,18 @@ class GitRepository(Repository): # http://gitorious.org/git-python def revision (self): - return self.repository.head.commit.hexsha + try: + return self.repository.head.commit.hexsha + except: + return self.repository.commits()[0].id def areTherePendingChanges (self): - return self.repository.is_dirty() + try: + return self.repository.is_dirty() + except TypeError, te: + return self.repository.is_dirty + #===================================================================