summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJochen Schmitt <Jochen@herr-schmitt.de>2010-09-16 20:05:51 +0200
committerJesse Keating <jkeating@redhat.com>2010-09-20 13:20:08 -0700
commita86aa28ef548579a3d7e2f25df752cba65a1544e (patch)
tree8909d9a27aa513cfd123124e583bd5680fee7859 /src
parent5ea2a82354f503ffcaf24c7288c640256a65306b (diff)
downloadfedora-packager-a86aa28ef548579a3d7e2f25df752cba65a1544e.zip
fedora-packager-a86aa28ef548579a3d7e2f25df752cba65a1544e.tar.gz
fedora-packager-a86aa28ef548579a3d7e2f25df752cba65a1544e.tar.xz
Distlinguish between new empty repositories and retiered packages
Hello Jesse, I have add an test to distlinguish a new package in which a package should been imported form a package which is retired. Best Regards: Jochen Schmitt
Diffstat (limited to 'src')
-rw-r--r--src/pyfedpkg/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 2694cb7..9d0865b 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -1264,13 +1264,20 @@ class PackageModule:
def gimmespec(self):
"""Return the name of a specfile within a package module"""
+ deadpackage = False
+
# Get a list of files in the path we're looking at
files = os.listdir(self.path)
# Search the files for the first one that ends with ".spec"
for f in files:
if f.endswith('.spec'):
return f
- raise FedpkgError('No spec file found.')
+ if f == 'dead.package':
+ deadpackage = True
+ if deadpackage:
+ raise FedpkgError('No spec file found. This package is retired')
+ else:
+ raise FedpkgError('No spec file found. Please import a new package')
def giturl(self):
"""Return the git url that would be used for building"""