Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
hmpf, it's fine if there's no tile_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsnolde committed Mar 8, 2022
1 parent 095d29f commit bf4a87f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

**Unreleased** is available in Github's `master` branch, but not on PyPI.

## [3.0.1](https://pypi.org/project/pyvalhalla/3.0.0/) - 2021-03-08

### Fixed

- Actor wouldn't initialize if either tile_dir OR tile_extract wasn't present; we only need of one them

## [3.0.0](https://pypi.org/project/pyvalhalla/3.0.0/) - 2021-03-08

### First release
4 changes: 2 additions & 2 deletions valhalla/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def __init__(self, config: Union[Path, str, dict]):
tile_dir = config.get("mjolnir", {}).get("tile_dir")

# raise if neither exists
if not tile_extract_fp or not tile_dir:
if not tile_extract_fp and not tile_dir:
raise AttributeError(
"Valhalla config JSON is not valid: either mjolnir.tile_extract or mjolnir.tile_dir is missing."
"Valhalla config JSON is not valid: mjolnir.tile_extract and mjolnir.tile_dir are missing."
)
if not Path(config["mjolnir"]["tile_extract"]).is_file():
if not Path(config["mjolnir"]["tile_dir"]).is_dir():
Expand Down

0 comments on commit bf4a87f

Please sign in to comment.