From: Michael Brown Date: Tue, 15 Feb 2022 11:51:37 +0000 (+0000) Subject: [console] Ensure that all ASCII characters are reachable in all keymaps X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=510f9de0a23d3a64654669e1a08ad7fdba5f270b;p=thirdparty%2Fipxe.git [console] Ensure that all ASCII characters are reachable in all keymaps Signed-off-by: Michael Brown --- diff --git a/src/util/genkeymap.py b/src/util/genkeymap.py index e471cd31a..8df949612 100755 --- a/src/util/genkeymap.py +++ b/src/util/genkeymap.py @@ -381,6 +381,12 @@ class Keymap: if source.isprintable() and target and target in unreachable} + # Check that all characters are now reachable + unreachable -= set(table.values()) + if unreachable: + raise ValueError("Unreachable characters: %s" % ', '.join( + KeymapKeys.ascii_name(x) for x in sorted(unreachable) + )) return KeymapKeys(dict(sorted(table.items()))) def cname(self, suffix: str) -> str: