diff --git a/lib/__init__.py b/lib/__init__.py index 0a8ed0f..2410e9e 100644 --- a/lib/__init__.py +++ b/lib/__init__.py @@ -159,7 +159,7 @@ def connect(dsn=None, if user is not None: items.append(('user', user)) if password is not None: - items.append(('password', password)) + items.append(('password', password.replace(' ', '\\ '))) if host is not None: items.append(('host', host)) # Reproducing the previous C implementation behaviour: swallow a