mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 13:44:36 +03:00
a1f0fc1a10
Psycopg2 has changed the kind of exception that is emitted on deadlocks between versions 2.7 and 2.8. The code was already trying to catch both kind of errors but because the psycopg2.errors package is unknown in 2.7 and below, the code would throw an exception on anything but a deadlock error. This commit wraps the deadlock handling into a context manager to avoid code duplication and uses module imports to detect if the new error codes are available. Also sets the required psycopg2 version to 2.7 or bigger as versions below are difficult to test. |
||
---|---|---|
.. | ||
Advanced-Installations.md | ||
Deployment.md | ||
Faq.md | ||
Import.md | ||
Installation.md | ||
Migration.md | ||
Setup-Nominatim-UI.md | ||
Update.md |