]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove use of contextlib.nested
authorankitagrawal <ankit11.agrawal@nttdata.com>
Thu, 14 May 2015 09:06:39 +0000 (02:06 -0700)
committerankitagrawal <ankit11.agrawal@nttdata.com>
Thu, 14 May 2015 09:16:25 +0000 (02:16 -0700)
commitf3f2e59ae76ab2a52ee448bf53722be5503f0d43
tree0af9fc6f72afb2f882f34872a4ca3593550205d1
parent1958a026b988f634e7152444b5eac9073c019296
Remove use of contextlib.nested

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
neutron/tests/unit/agent/test_securitygroups_rpc.py tests.

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: Ia66b98423b14fc7d1bbf6d8a673a49f798d328fa
neutron/hacking/checks.py
neutron/tests/unit/agent/test_securitygroups_rpc.py