summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fedora-packager.spec2
-rw-r--r--src/pyfedpkg/__init__.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/fedora-packager.spec b/fedora-packager.spec
index 827f06f..02e02b3 100644
--- a/fedora-packager.spec
+++ b/fedora-packager.spec
@@ -20,7 +20,7 @@ Requires: mock cvs curl wget make openssh-clients
Requires: pyOpenSSL python-pycurl
Requires: redhat-rpm-config
Requires: python-offtrac
-Requires: GitPython python-argparse
+Requires: GitPython >= 0.2.0, python-argparse
BuildArch: noarch
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 5186c87..9350207 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -318,7 +318,7 @@ class PackageModule:
if not url:
# We don't have a url, so build from the latest commit
# Check to see if the tree is dirty
- if self.repo.is_dirty:
+ if self.repo.is_dirty():
raise FedpkgError('There are uncommitted changes in your repo')
# Need to check here to see if the local commit you want to build is
# pushed or not
@@ -326,7 +326,7 @@ class PackageModule:
if self.repo.git.rev_list('...origin/%s' % self.repo.active_branch):
raise FedpkgError('There are unpushed changes in your repo')
# Get the commit hash to build
- commit = self.repo.commits(max_count=1)[0].id
+ commit = self.repo.iter_commits().next().sha
url = ANONGITURL % {'module': self.module} + '?#%s' % commit
# Check to see if the target is valid
build_target = self.kojisession.getBuildTarget(self.target)