[elbe-devel] [PATCH] elbepack: init: correctly test message of NoKinitrdException

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Aug 6 08:38:14 CEST 2024


The NoKinitrdException object does not have an attribute "msg".

This got broken in commit
4c25533fbd3c ("elbepack: init: split functionality into create_initvm()")
which tried to get rid of the local variable "msg".

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/init/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/init/__init__.py b/elbepack/init/__init__.py
index 879b31f970ce..d1b6a9889598 100644
--- a/elbepack/init/__init__.py
+++ b/elbepack/init/__init__.py
@@ -89,7 +89,7 @@ def create_initvm(name, xmlfile, directory, *,
             'Failure to download kernel/initrd debian Package\n'
             'Check Mirror configuration'
         )
-        if 'SHA256SUMS' in e.msg:
+        if 'SHA256SUMS' in str(e):
             msg += ('\nIf you use debmirror please read '
                     'https://github.com/Linutronix/elbe/issues/188 '
                     'on how to work around the issue')

---
base-commit: 781f8b945a8d37ddd1619c54bb82727fe266155b
change-id: 20240806-nokinitrdexception-d132876fa249

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh at linutronix.de>



More information about the elbe-devel mailing list