X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0add25e33500110a36458a0bb3fa292d408d2b85..c7d80a2cc8cacb7dba95f023c2f480d25f7bf6b1:/src/nominatim_db/tools/replication.py diff --git a/src/nominatim_db/tools/replication.py b/src/nominatim_db/tools/replication.py index 2b1d444f..eb031f39 100644 --- a/src/nominatim_db/tools/replication.py +++ b/src/nominatim_db/tools/replication.py @@ -16,8 +16,6 @@ import time import types import urllib.request as urlrequest -import requests - from ..errors import UsageError from ..db import status from ..db.connection import Connection, connect, server_version_tuple @@ -27,9 +25,10 @@ try: from osmium.replication.server import ReplicationServer from osmium import WriteHandler from osmium import version as pyo_version -except ImportError as exc: + import requests +except ModuleNotFoundError as exc: logging.getLogger().critical("pyosmium not installed. Replication functions not available.\n" - "To install pyosmium via pip: pip3 install osmium") + "To install pyosmium via pip: pip install osmium") raise UsageError("replication tools not available") from exc LOG = logging.getLogger()