diff --git a/icinga-build-upload-aptly b/icinga-build-upload-aptly index 0fbfbf601fd16127a816a8760082511398549e45..731331fc91e17516ba84b6ea5e8cc9421d88bfcf 100755 --- a/icinga-build-upload-aptly +++ b/icinga-build-upload-aptly @@ -31,16 +31,10 @@ def scan_dir(path, pattern): return found def detect_rpm(path): - source = scan_dir(path, '*.src.rpm') rpms = scan_dir(path, '*.rpm') - if len(source) == 0: + if len(rpms) == 0: return [] - elif len(source) != 1: - raise StandardError, 'There more than one source RPM in ' + path - - if len(rpms) < 2: - raise StandardError, 'There should be at least 2 RPMS in ' + path - + return rpms def detect_deb(path): diff --git a/icinga-build-upload-aptly-subscription b/icinga-build-upload-aptly-subscription index d63c388b93c38f95c04332352b9b434a66fb9b8d..7af00e1659d17fb4aa1dc05e11d24cb433a8e398 100755 --- a/icinga-build-upload-aptly-subscription +++ b/icinga-build-upload-aptly-subscription @@ -31,15 +31,9 @@ def scan_dir(path, pattern): return found def detect_rpm(path): - source = scan_dir(path, '*.src.rpm') rpms = scan_dir(path, '*.rpm') - if len(source) == 0: + if len(rpms) == 0: return [] - elif len(source) != 1: - raise StandardError, 'There more than one source RPM in ' + path - - if len(rpms) < 2: - raise StandardError, 'There should be at least 2 RPMS in ' + path return rpms