Skip to content

Commit caf127e

Browse files
authored
Don't break socket connections for postgres (#540)
1 parent 57f6b49 commit caf127e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dbbackup/db/postgresql.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99

1010
def create_postgres_uri(self):
11-
host = self.settings.get("HOST") or "localhost"
12-
dbname = self.settings.get("NAME") or ""
11+
host = self.settings.get("HOST", "localhost")
12+
dbname = self.settings.get("NAME", "")
1313
user = quote(self.settings.get("USER") or "")
14-
password = self.settings.get("PASSWORD") or ""
14+
password = self.settings.get("PASSWORD", "")
1515
password = f":{quote(password)}" if password else ""
1616
if not user:
1717
password = ""

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Changelog
44
Unreleased
55
----------
66

7-
* Nothing (yet)!
7+
* Empty string as HOST for postgres unix domain socket connection is now supported.
88

99
4.2.1 (2024-08-23)
1010
----------

0 commit comments

Comments
 (0)