mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
port code to psycopg3
This commit is contained in:
@@ -31,7 +31,7 @@ class NominatimVersion(NamedTuple):
|
||||
major: int
|
||||
minor: int
|
||||
patch_level: int
|
||||
db_patch_level: Optional[int]
|
||||
db_patch_level: int
|
||||
|
||||
def __str__(self) -> str:
|
||||
if self.db_patch_level is None:
|
||||
@@ -47,6 +47,7 @@ class NominatimVersion(NamedTuple):
|
||||
return f"{self.major}.{self.minor}.{self.patch_level}"
|
||||
|
||||
|
||||
|
||||
def parse_version(version: str) -> NominatimVersion:
|
||||
""" Parse a version string into a version consisting of a tuple of
|
||||
four ints: major, minor, patch level, database patch level
|
||||
|
||||
Reference in New Issue
Block a user