This commit is contained in:
Brendan Reilly
2021-08-12 15:53:53 -04:00
parent 39add4382c
commit 2cb057daf6
4 changed files with 7 additions and 7 deletions

View File

@@ -362,7 +362,7 @@ class KojiContentGenerator(object):
ret["filename"] = mmd_filename
ret["filesize"] = len(raw_data)
ret["checksum"] = hashlib.md5(raw_data).hexdigest()
except IOError as e:
except IOError:
if arch == "src":
# This might happen in case the Module is submitted directly
# using the yaml without SCM URL. This should never happen
@@ -371,7 +371,7 @@ class KojiContentGenerator(object):
log.warning("No modulemd.src.txt found.")
return
else:
raise RuntimeError("Could not read %s: %s" % (mmd_path, e))
raise
components = []
if arch in ["noarch", "src"]:
@@ -878,7 +878,7 @@ class KojiContentGenerator(object):
build_info = session.CGImport(metadata, serverdir)
except koji.GenericError as e:
if "Build already exists" not in str(e):
raise RuntimeError("Build import failed: %s" % e)
raise
log.warning("Failed to import content generator")
build_info = None
if conf.koji_cg_tag_build:

View File

@@ -330,7 +330,7 @@ class GenericBuilder(six.with_metaclass(ABCMeta)):
state=BUILD_STATES["failed"],
state_reason=reason, failure_type="user")
db_session.commit()
raise RuntimeError("Failed to gather buildroot groups from SCM.")
raise
return groups
@abstractmethod

View File

@@ -226,7 +226,7 @@ class SCM(object):
"checkout: The requested commit hash was not found within the repository. "
"Perhaps you forgot to push. The original message was: %s" % str(e)
)
raise RuntimeError("Unable to checkout module from SCM: %s" % e)
raise
timestamp = SCM._run(["git", "show", "-s", "--format=%ct"], chdir=self.sourcedir)[1]
self.version = provide_module_stream_version_from_timestamp(timestamp=timestamp)

View File

@@ -182,10 +182,10 @@ def _get_default_modules(stream, default_modules_scm_url):
scm_obj.checkout_ref(conf.rawhide_branch)
else:
# If it's not a rawhide build, then the branch should have existed
raise RuntimeError("Branch %s does not exist" % stream)
raise
else:
# If it's not a rawhide build, then the branch should have existed
raise RuntimeError("Branch %s does not exist" % stream)
raise
idx = Modulemd.ModuleIndex.new()
idx.update_from_defaults_directory(