Fix nested() for py3

nested() should return enter_context instead of
nothing.

Change-Id: I910eace453d07e2f9a12dd0ce0eca22f4d155472
This commit is contained in:
Oleksii Chuprykov 2014-11-24 18:43:24 +02:00
parent b80fceaf40
commit 86c136a084

@ -25,9 +25,7 @@ if six.PY3:
@contextlib.contextmanager
def nested(*contexts):
with contextlib.ExitStack() as stack:
for c in contexts:
stack.enter_context(c)
yield
yield [stack.enter_context(c) for c in contexts]
else:
nested = contextlib.nested