Skip to content

Commit

Permalink
fixed import error
Browse files Browse the repository at this point in the history
  • Loading branch information
AndGem committed May 21, 2024
1 parent 1265565 commit 04a9494
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 04a9494

Please sign in to comment.