mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-01-10 12:10:04 +01:00
Merge pull request #36 from jokajak/buildFix
add code to handle older version of GitPython
This commit is contained in:
commit
36ff1deefc
@ -56,11 +56,18 @@ class GitRepository(Repository):
|
|||||||
# http://gitorious.org/git-python
|
# http://gitorious.org/git-python
|
||||||
|
|
||||||
def revision (self):
|
def revision (self):
|
||||||
|
try:
|
||||||
return self.repository.head.commit.hexsha
|
return self.repository.head.commit.hexsha
|
||||||
|
except:
|
||||||
|
return self.repository.commits()[0].id
|
||||||
|
|
||||||
|
|
||||||
def areTherePendingChanges (self):
|
def areTherePendingChanges (self):
|
||||||
|
try:
|
||||||
return self.repository.is_dirty()
|
return self.repository.is_dirty()
|
||||||
|
except TypeError, te:
|
||||||
|
return self.repository.is_dirty
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#===================================================================
|
#===================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user