Load mappings at module initialisation

This commit is contained in:
Alan 2017-08-02 10:16:56 +00:00 committed by Florian Müllner
parent 6cbef9355d
commit 58dc538510

View File

@ -181,13 +181,14 @@ def load_xkb_mappings():
return name_to_xkb return name_to_xkb
locale.setlocale(locale.LC_ALL, "C")
name_to_xkb = load_xkb_mappings()
if __name__ == "__main__": if __name__ == "__main__":
if "DEBUG" in os.environ: if "DEBUG" in os.environ:
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
locale.setlocale(locale.LC_ALL, "C")
name_to_xkb = load_xkb_mappings()
if len(sys.argv) < 2: if len(sys.argv) < 2:
print("supply a CLDR keyboard file") print("supply a CLDR keyboard file")
sys.exit(1) sys.exit(1)