diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index 0dbbd8934..65621dd1d 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -58,6 +58,19 @@ def run(): for k in libcalamares.globalstorage.keys(): libcalamares.utils.debug(f" {k}={libcalamares.globalstorage.value(k)}") + libcalamares.utils.debug("*** GLOBAL STORAGE BOGUS KEYS ***") + # + # This is a demonstration of issue #2237, load this module + # with the dummypython/tests/1.global configuration, e.g. + # ./loadmodule -g ../src/modules/dummypython/tests/1.global dummypython + # in the build directory. + # + for k in ("nonexistent", "empty", "numeric", "boolvalue"): + if libcalamares.globalstorage.value(k) is None: + libcalamares.utils.debug(f"NONE {k}={libcalamares.globalstorage.value(k)}") + else: + libcalamares.utils.debug(f" {k}={libcalamares.globalstorage.value(k)}") + libcalamares.utils.debug("*** GLOBAL STORAGE MODIFICATION ***") libcalamares.globalstorage.insert("item2", "value2") libcalamares.globalstorage.insert("item3", 3) diff --git a/src/modules/dummypython/tests/1.global b/src/modules/dummypython/tests/1.global new file mode 100644 index 000000000..d0d194e6b --- /dev/null +++ b/src/modules/dummypython/tests/1.global @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +firmwareType: bios +bootLoader: grub +empty: