diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-08-20 16:08:37 -0700 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-08-20 16:08:37 -0700 |
commit | 322d5cc014245f9232875c75811075591d56cf91 (patch) | |
tree | b206a891462a38bc9a1087d3b82891e15899ffb1 /src/pyfedpkg/__init__.py | |
parent | 6537a641a9deb430073a15d04a0d49bc3f812408 (diff) | |
download | fedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.gz fedora-packager-322d5cc014245f9232875c75811075591d56cf91.tar.xz fedora-packager-322d5cc014245f9232875c75811075591d56cf91.zip |
Short cut the failure on repeated builds
Saves a bunch of time waiting for the srpm creation and koji to figure
out what n-v-r we're trying to build. Ticket #27
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r-- | src/pyfedpkg/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index cdccd7f..b34481d 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1034,6 +1034,14 @@ class PackageModule: priority = 5 # magic koji number :/ cmd.append(self.target) + # see if this build has been done. Does not check builds within + # a chain + if not scratch: + build = self.kojisession.getBuild(self.nvr) + if build: + if build['state'] == 1: + raise FedpkgError('%s has already been built' % + self.nvr) # Now submit the task and get the task_id to return # Handle the chain build version if chain: |