Skip to content

Commit

Permalink
Don't break socket connections for postgres (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
sur5r authored Jan 6, 2025
1 parent 57f6b49 commit caf127e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dbbackup/db/postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
----------
Expand Down

0 comments on commit caf127e

Please sign in to comment.