From bccc1419a67c06636b5d5a8d5c00612b7d843edd Mon Sep 17 00:00:00 2001 From: Valery Yundin Date: Fri, 16 Dec 2016 09:22:08 -0500 Subject: Better hide engine password Avoid putting engine password in the exception message in `MetaData.reflect` (since exception messages often appear in logs). Use the same redacted `__repr__` implementation in `TLEngine` as in its base class `Engine` Change-Id: Ic0a7baea917a9c8d87dffdd82ef566673ab08e02 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/327 --- lib/sqlalchemy/sql/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 793750f1c..9bb0eee43 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -3811,8 +3811,8 @@ class MetaData(SchemaItem): s = schema and (" schema '%s'" % schema) or '' raise exc.InvalidRequestError( 'Could not reflect: requested table(s) not available ' - 'in %s%s: (%s)' % - (bind.engine.url, s, ', '.join(missing))) + 'in %r%s: (%s)' % + (bind.engine, s, ', '.join(missing))) load = [name for name in only if extend_existing or name not in current] -- cgit v1.2.1