diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-01 17:46:17 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-06-01 17:46:17 -0400 |
commit | fae54b27dbf41e52d10a61f7d4994ff6ac22337a (patch) | |
tree | 295ad4761c7b2facee4556b5d68269bbd0b9d9cc /lib/sqlalchemy/schema.py | |
parent | f784ac6dbae7b8fe07e9d898527a7a27dba2b3e4 (diff) | |
download | sqlalchemy-fae54b27dbf41e52d10a61f7d4994ff6ac22337a.tar.gz |
- Fixed bug whereby metadata.reflect(bind)
would close a Connection passed as a
bind argument. Regression from 0.6.
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r-- | lib/sqlalchemy/schema.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index e85c82ad7..511d922a0 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -2338,7 +2338,8 @@ class MetaData(SchemaItem): for name in load: Table(name, self, **reflect_opts) finally: - if conn is not None: + if conn is not None and \ + conn is not bind: conn.close() def append_ddl_listener(self, event_name, listener): |