From 04a94947473238f1c5f333ea86d50d96d6f9bd5e Mon Sep 17 00:00:00 2001 From: Andreas Gemsa Date: Tue, 21 May 2024 21:37:10 +0200 Subject: [PATCH] fixed import error --- run.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index bc3838b..97f5919 100644 --- a/run.py +++ b/run.py @@ -93,7 +93,15 @@ def validate_networkx(): raise FileNotFoundError( f"Provided filename {filename} does not point to a file!" ) - network_type = config.Configuration.validate_network_type(options.network_type) + + long_network_type = {"p": "pedestrian", "c": "car", "b": "bicycle"} + if options.network_type in long_network_type: + network_type = long_network_type[options.network_type] + elif options.network_type == long_network_type.values(): + network_type = options.network_type + else: + print("ERROR: network type improperly set") + sys.exit(1) except FileNotFoundError as e: print(f"ERROR: {e}") sys.exit(1)