aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdlpcvp.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/dlpcvp.py b/dlpcvp.py
index c786741..2b6abaa 100755
--- a/dlpcvp.py
+++ b/dlpcvp.py
@@ -153,8 +153,7 @@ def get_spec_name(req: Request, proj: str, pkg: str, etag: OStr = None) -> OStr:
return None
except HTTPError as ex:
- if ex.getcode() == 404:
- log.warning(f'Cannot acquire version of {pkg}.')
+ if ex.getcode() in (400, 404):
return None
else:
raise
@@ -220,6 +219,9 @@ def package_version(proj: str, pkgn: str,
req_spc_name = Request(url=OBS_base + f'/source/{proj}/{pkgn}?expand=1')
spc_fname = get_spec_name(req_spc_name, proj, pkgn, etag_fn)
+ if spc_fname is None:
+ return None
+
req_spec = Request(url=OBS_base +
f'/source/{proj}/{pkgn}/{spc_fname}?expand=1')