]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove use of contextlib.nested (api-tests)
authorankitagrawal <ankit11.agrawal@nttdata.com>
Thu, 14 May 2015 12:19:44 +0000 (05:19 -0700)
committerankitagrawal <ankit11.agrawal@nttdata.com>
Tue, 26 May 2015 09:57:08 +0000 (02:57 -0700)
commit8ee3020c47cd7eb716216852a90c3db595e2c3c6
tree36d67e0ccca53dfe6f2f72db986acc2e801ad0e3
parent2f8373aff60b7293bcc46137a366bf917d784996
Remove use of contextlib.nested (api-tests)

Removed use of contextlib.nested call from codebase, as it has been
deprecated since Python 2.7.

There are also known issues with contextlib.nested that were addressed
by the native support for multiple "with" variables. For instance, if
the first object is created but the second one throws an exception,
the first object's __exit__ is never called. For more information see
https://docs.python.org/2/library/contextlib.html#contextlib.nested
contextlib.nested is also not compatible with Python 3.

Multi-patch set for easier chunks. This one addresses the tests from
neutron/tests/unit/api directory.

Line continuation markers (e.g. '\') had to be used or syntax
errors were thrown. While using parentheses is the preferred way
for multiple line statements, but in case of long with statements
backslashes are acceptable.

Partial-Bug: 1428424
Change-Id: I09673f9d4c7f07d3043804676fef018905dd1239
neutron/hacking/checks.py
neutron/tests/unit/api/rpc/handlers/test_securitygroups_rpc.py