summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/engine/url.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/url.py b/lib/sqlalchemy/engine/url.py
index 32e3f8a6b..9ea611d8b 100644
--- a/lib/sqlalchemy/engine/url.py
+++ b/lib/sqlalchemy/engine/url.py
@@ -66,10 +66,10 @@ class URL(object):
def __to_string__(self, hide_password=True):
s = self.drivername + "://"
if self.username is not None:
- s += _rfc_1738_quote(self.username)
+ s += _rfc_1738_quote(str(self.username))
if self.password is not None:
s += ':' + ('***' if hide_password
- else _rfc_1738_quote(self.password))
+ else _rfc_1738_quote(str(self.password)))
s += "@"
if self.host is not None:
if ':' in self.host: