]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Remove use of contextlib.nested
authorSean McGinnis <sean_mcginnis@dell.com>
Tue, 24 Feb 2015 15:24:52 +0000 (09:24 -0600)
committerSean McGinnis <sean_mcginnis@dell.com>
Thu, 12 Mar 2015 18:45:29 +0000 (13:45 -0500)
commitddbcdbb2d02a46eb0392e00a2b2d8e246cc8e3de
tree6edc7f777f3a0427c5b5377945671e99ec626389
parent72b7f3b8b5ba77954826d7d20ce4d380f505782b
Remove use of contextlib.nested

The contextlib.nested call has been deprecated
in Python 2.7. This causes DeprecationWarning
messages in the unit tests.

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.

Since Cinder no longer supports 2.6 we can remove
the use of these contextlib.nested calls.

Added hacking check to catch if any new instances
are added to the codebase.

Note: 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 it is not a requirement.

Partial-Bug: 1428424
Change-Id: I7bb7d201d31ff239be3402fb64e5f202ede019b0
HACKING.rst
cinder/hacking/checks.py
cinder/tests/compute/test_nova.py
cinder/tests/test_backup_ceph.py
cinder/tests/test_cmd.py
cinder/tests/test_hacking.py
cinder/tests/test_quobyte.py
cinder/tests/test_smbfs.py
cinder/tests/test_volume.py