From e92b73d4ee44b0e5fe1478132d8feb1a8886279c Mon Sep 17 00:00:00 2001 From: Yuri Baida Date: Sat, 30 May 2015 01:13:42 -0700 Subject: Update url.py Fix for situation when username or password is an integer number --- lib/sqlalchemy/engine/url.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine/url.py') 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: -- cgit v1.2.1