diff --git a/icinga-build-upload-aptly b/icinga-build-upload-aptly index 0fbfbf601fd16127a816a8760082511398549e45..57c85dcf2e387ca3381abdbe4041bd9507bd5aad 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(rpm) == 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..baf9e28675a20ca005a7f2c54d9186704b67d118 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(rpm) == 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