build_module_map: use OrderedDict if available

this results in a much nicer "usage" screen by argparse
pull/19/head
András Veres-Szentkirályi 2018-02-24 21:28:46 +01:00
rodzic c6504a7551
commit 6d3d2143b7
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -47,7 +47,11 @@ def main():
def build_module_map():
module_map = {}
try:
from collections import OrderedDict
module_map = OrderedDict()
except ImportError:
module_map = {}
for module in SSTV_MODULES:
for mode in module.MODES:
module_map[mode.__name__] = mode