mirror of
https://github.com/enzet/map-machine.git
synced 2025-06-03 03:11:52 +02:00
Issue #140: check for an empty scheme file.
This commit is contained in:
parent
a6955c7d22
commit
cb1bdceedb
2 changed files with 12 additions and 5 deletions
|
@ -267,7 +267,9 @@ def render_map(arguments: argparse.Namespace) -> None:
|
|||
if scheme_path is None:
|
||||
fatal(f"Scheme `{arguments.scheme}` not found.")
|
||||
|
||||
scheme: Scheme = Scheme.from_file(scheme_path)
|
||||
scheme: Optional[Scheme] = Scheme.from_file(scheme_path)
|
||||
if scheme is None:
|
||||
fatal(f"Failed to load scheme from `{arguments.scheme}`.")
|
||||
|
||||
configuration: MapConfiguration = MapConfiguration.from_options(
|
||||
scheme, arguments, float(arguments.zoom)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue