summaryrefslogtreecommitdiff
path: root/test-requirements.txt
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-07-24 14:21:29 -0400
committerRoman Podoliaka <rpodolyaka@mirantis.com>2015-07-27 19:02:41 +0300
commitd5f390f55c8e87b10f954dae3d480362c351e5ca (patch)
tree1237b7fffa8fae0fc6c17b16736e13924a65cf76 /test-requirements.txt
parent984d41cd7c83cb6f84166c2dd1011024add6f57c (diff)
downloadoslo-db-d5f390f55c8e87b10f954dae3d480362c351e5ca.tar.gz
Improve failure mode handling in enginefacade
Check explicitly for the cases where no "sql_connection" attribute was set when running _start(), so that the lack of this parameter is documented by the exception rather than failing into create_engine() with an unclear failure mode. If _start() fails as it will here, make sure _started stays False so that repeated calls to _start() continue to raise the same exception, rather than raising attribute errors. When accessing the "session" or "connection" attributes of the context when these attributes were not requested by the decorator or context manager, raise explicit exceptions for each, rather than returning None which leads to hard-to-debug NoneType errors. Change-Id: Iadfbf4707daed4140285a3a472009f6863b18275 Closes-bug: 1477080
Diffstat (limited to 'test-requirements.txt')
0 files changed, 0 insertions, 0 deletions