From 833db72ed9733519fbee4e0097cc0fcd6f857739 Mon Sep 17 00:00:00 2001 From: clime Date: Oct 17 2017 15:56:53 +0000 Subject: [rpmbuild] fix exception raising in scm provider --- diff --git a/rpmbuild/copr_rpmbuild/helpers.py b/rpmbuild/copr_rpmbuild/helpers.py index 28c3576..8985f9c 100644 --- a/rpmbuild/copr_rpmbuild/helpers.py +++ b/rpmbuild/copr_rpmbuild/helpers.py @@ -38,7 +38,7 @@ def run_cmd(cmd, cwd=".", preexec_fn=None): :param str cwd: In which directory to execute the command :param func preexec_fn: a callback invoked before exec in subprocess - :raises PackageImportException + :raises RuntimeError :returns munch.Munch(cmd, stdout, stderr, returncode) """ log.info('Running: {cmd}'.format(cmd=' '.join(cmd))) @@ -72,7 +72,7 @@ def locate_spec(dirpath): spec_path = path_match break if not spec_path: - raise PackageImportException('No .spec found at {}'.format(dirpath)) + raise RuntimeError('No .spec found at {}'.format(dirpath)) return spec_path @@ -84,7 +84,7 @@ def locate_srpm(dirpath): srpm_path = path_match break if not srpm_path: - raise PackageImportException('No .src.rpm found at {}'.format(dirpath)) + raise RuntimeError('No .src.rpm found at {}'.format(dirpath)) return srpm_path