mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-05 12:21:54 +02:00
Issue #140: add error handling.
This commit is contained in:
parent
692997f54a
commit
199dff9599
1 changed files with 5 additions and 3 deletions
|
@ -263,9 +263,11 @@ def render_map(arguments: argparse.Namespace) -> None:
|
|||
|
||||
:param arguments: command-line arguments
|
||||
"""
|
||||
scheme: Scheme = Scheme.from_file(
|
||||
workspace.find_scheme_path(arguments.scheme)
|
||||
)
|
||||
scheme_path: Optional[Path] = workspace.find_scheme_path(arguments.scheme)
|
||||
if scheme_path is None:
|
||||
fatal(f"Scheme `{arguments.scheme}` not found.")
|
||||
|
||||
scheme: Scheme = Scheme.from_file(scheme_path)
|
||||
|
||||
configuration: MapConfiguration = MapConfiguration.from_options(
|
||||
scheme, arguments, float(arguments.zoom)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue