mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
Added missing return types to functions
This commit is contained in:
committed by
Sarah Hoffmann
parent
482f7fe3ba
commit
97ac036df5
@@ -39,14 +39,14 @@ def _require_version(module: str, actual: Tuple[int, int], expected: Tuple[int,
|
|||||||
raise UsageError(f'{module} is too old.')
|
raise UsageError(f'{module} is too old.')
|
||||||
|
|
||||||
|
|
||||||
def _require_loaded(extension_name: str, conn: Connection):
|
def _require_loaded(extension_name: str, conn: Connection) -> None:
|
||||||
""" Check that the given extension is loaded. """
|
""" Check that the given extension is loaded. """
|
||||||
if not conn.extension_loaded(extension_name):
|
if not conn.extension_loaded(extension_name):
|
||||||
LOG.fatal('Required module %s is not loaded.', extension_name)
|
LOG.fatal('Required module %s is not loaded.', extension_name)
|
||||||
raise UsageError(f'{extension_name} is not loaded.')
|
raise UsageError(f'{extension_name} is not loaded.')
|
||||||
|
|
||||||
|
|
||||||
def check_existing_database_plugins(dsn: str):
|
def check_existing_database_plugins(dsn: str) -> None:
|
||||||
""" Check that the database has the required plugins installed."""
|
""" Check that the database has the required plugins installed."""
|
||||||
with connect(dsn) as conn:
|
with connect(dsn) as conn:
|
||||||
_require_version('PostgreSQL server',
|
_require_version('PostgreSQL server',
|
||||||
|
|||||||
Reference in New Issue
Block a user