From caf127e6d16b2d322fed858e2c8d268a6eee5f9a Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Mon, 6 Jan 2025 02:13:27 +0100 Subject: [PATCH] Don't break socket connections for postgres (#540) --- dbbackup/db/postgresql.py | 6 +++--- docs/changelog.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbbackup/db/postgresql.py b/dbbackup/db/postgresql.py index 1dd737a..3f88ee7 100644 --- a/dbbackup/db/postgresql.py +++ b/dbbackup/db/postgresql.py @@ -8,10 +8,10 @@ def create_postgres_uri(self): - host = self.settings.get("HOST") or "localhost" - dbname = self.settings.get("NAME") or "" + host = self.settings.get("HOST", "localhost") + dbname = self.settings.get("NAME", "") user = quote(self.settings.get("USER") or "") - password = self.settings.get("PASSWORD") or "" + password = self.settings.get("PASSWORD", "") password = f":{quote(password)}" if password else "" if not user: password = "" diff --git a/docs/changelog.rst b/docs/changelog.rst index 2715009..6bf536e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,7 +4,7 @@ Changelog Unreleased ---------- -* Nothing (yet)! +* Empty string as HOST for postgres unix domain socket connection is now supported. 4.2.1 (2024-08-23) ----------