fix: the web service waits for the PostgreSQL driver instead of failing at start.
Release / release (push) Successful in 25s

This commit is contained in:
slawek committed 2026-10-24 10:43:51 +02:00
1 parent c0cd323a0c
commit 732cc8cb54
5 files changed
+72 -30

No files matched your search

+3 -3
View File
@@ -29,8 +29,8 @@ import sys
sys.path.insert(0, '/usr/lib/vpn-router')
import ldap
import psycopg
import vpnrouter_auth
import vpnrouter_users
from vpnrouter_users import Failure
@@ -135,8 +135,8 @@ def main(argv):
message, status = str(failure), failure.status
except (ldap.LDAPError, OSError) as exc:
message, status = f'the user directory failed: {exc}', 1
except psycopg.Error as exc:
message, status = f'the token database failed: {exc}', 1
except vpnrouter_auth.DatabaseError as exc:
message, status = str(exc), 1
else:
print(json.dumps(answer) if as_json else text_of(answer))
return 0