diff options
author | Daniel Schadt <kingdread@gmx.de> | 2025-08-11 22:45:39 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2025-08-11 22:45:39 +0200 |
commit | 5ee7ae917c04cb43717b1be79146cb379cfa8715 (patch) | |
tree | 53319aa6e7aff13ca6cefadadd6ad83477b16c8b | |
parent | 818e75efb20127d29462370573f282a1c4549f53 (diff) | |
download | fietsboek-5ee7ae917c04cb43717b1be79146cb379cfa8715.tar.gz fietsboek-5ee7ae917c04cb43717b1be79146cb379cfa8715.tar.bz2 fietsboek-5ee7ae917c04cb43717b1be79146cb379cfa8715.zip |
carefully import hittekaart_pyhittekaart-py
-rw-r--r-- | fietsboek/hittekaart.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fietsboek/hittekaart.py b/fietsboek/hittekaart.py index 06319a4..25d4864 100644 --- a/fietsboek/hittekaart.py +++ b/fietsboek/hittekaart.py @@ -10,7 +10,10 @@ import tempfile from pathlib import Path from typing import Optional -import hittekaart_py +try: + import hittekaart_py +except ImportError: + hittekaart_py = None from sqlalchemy import select from sqlalchemy.orm import aliased from sqlalchemy.orm.session import Session @@ -56,6 +59,9 @@ def generate( :param threads: Number of threads that ``hittekaart`` should use. Defaults to 0, which uses all available cores. """ + if hittekaart_py is None: + raise RuntimeError("hittekaart not available") + if not input_files: return |