explicitly check 404 status_code

This commit is contained in:
Yu Ming Zhu 2023-12-05 14:01:08 +00:00
parent 134360df2e
commit 931bdb9292

View file

@ -932,7 +932,7 @@ class BuildRoot(object):
nvra = "%(name)s-%(version)s-%(release)s.%(arch)s" % repo_rpm
repo_rpms[nvra] = repo_rpm
except requests.exceptions.HTTPError as e:
if '404' in str(e):
if e.response.status_code == 404:
self.logger.warning("Missing repo content file: %s", rpmlist_path)
# TODO: remove this workaround once we can assume that repos contain this file
self.compat_map_internal_rpms(rpmlist)