[elbe-devel] [PATCH 8/8] pkgutils: raise an exception if pkg not found
Manuel Traut
manut at linutronix.de
Fri Jan 5 22:35:35 CET 2018
return exception if package was not found to avoid iterating over a
None type later in the code
Signed-off-by: Manuel Traut <manut at linutronix.de>
---
elbepack/pkgutils.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/elbepack/pkgutils.py b/elbepack/pkgutils.py
index 3ce9d31e..8fcd79ec 100644
--- a/elbepack/pkgutils.py
+++ b/elbepack/pkgutils.py
@@ -232,6 +232,9 @@ def download_pkg(prj, target_dir, defs, package, arch="default", incl_deps=False
except CommandError as e:
raise NoKinitrdException("couldn't download package %s" % package)
+ if not urilist:
+ raise NoKinitrdException("couldn't download package %s" % package)
+
for u in urilist:
sha256 = u[2]
uri = u[1]
--
2.15.1
More information about the elbe-devel
mailing list