diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-11 17:41:12 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-12-11 17:41:12 +0000 |
commit | 738e134f8c6a9ef6f79446d553bab4737e79cd89 (patch) | |
tree | b022c93b2fbd281dacf92871f4276e1e14a7d00e | |
parent | b8878ef62a7215dbad8bcc0dd345d981023fd938 (diff) | |
download | sqlalchemy-738e134f8c6a9ef6f79446d553bab4737e79cd89.tar.gz |
- Connection.invalidate() checks for closed status
to avoid attribute errors. [ticket:1246]
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/engine/base.py | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -21,6 +21,10 @@ CHANGES - Fixed bug in composite types which prevented a primary-key composite type from being mutated [ticket:1213]. + +- sql + - Connection.invalidate() checks for closed status + to avoid attribute errors. [ticket:1246] 0.4.8 ===== diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index f45644a8e..df4963a33 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -637,6 +637,8 @@ class Connection(Connectable): operations in a non-transactional state. """ + if self.closed: + raise exceptions.InvalidRequestError("This Connection is closed") if self.__connection.is_valid: self.__connection.invalidate(exception) |