diff --git a/dbbackup/db/postgresql.py b/dbbackup/db/postgresql.py index 1dd737a..9619845 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 "" - user = quote(self.settings.get("USER") or "") - password = self.settings.get("PASSWORD") or "" + host = self.settings.get("HOST", "localhost") + dbname = self.settings.get("NAME", "") + user = quote(self.settings.get("USER", "")) + password = self.settings.get("PASSWORD", "") password = f":{quote(password)}" if password else "" if not user: password = ""