[dummypython] Demonstrator for #2237

This commit is contained in:
Adriaan de Groot 2023-11-16 23:10:53 +01:00
parent 51a1d06c51
commit 8305b6cb1a
2 changed files with 19 additions and 0 deletions

View File

@ -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)

View File

@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
---
firmwareType: bios
bootLoader: grub
empty: