From 67ba4cd7b5bc5e834db3106b3081677ee70d18f7 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 19 Mar 2012 01:30:36 +0000 Subject: add code to handle older version of GitPython --- (limited to 'scripts/builder') 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 + #=================================================================== -- cgit v0.9.0.2