From 6d3d2143b7b0397d7f035400b824d1bdebc45828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Sat, 24 Feb 2018 21:28:46 +0100 Subject: [PATCH] build_module_map: use OrderedDict if available this results in a much nicer "usage" screen by argparse --- pysstv/__main__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pysstv/__main__.py b/pysstv/__main__.py index 0468ae0..04a91bf 100644 --- a/pysstv/__main__.py +++ b/pysstv/__main__.py @@ -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