From baf129705a56ead40a71b1813003439e06fd1538 Mon Sep 17 00:00:00 2001 From: Michele Simionato Date: Mon, 1 Nov 2021 16:34:21 +0100 Subject: Fixed the ContextManager --- src/decorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/decorator.py b/src/decorator.py index 7980acf..ac78479 100644 --- a/src/decorator.py +++ b/src/decorator.py @@ -313,7 +313,7 @@ class ContextManager(_GeneratorContextManager): def __call__(self, func): def caller(f, *a, **k): - with self._recreate_cm(): + with self.__class__(self.func, *self.args, **self.kwds): return f(*a, **k) return decorate(func, caller) -- cgit v1.2.1