mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Always run SyncWrapper.close on __exit__
This commit is contained in:
parent
e79e3899e4
commit
c1cc4e23af
1 changed files with 2 additions and 3 deletions
|
@ -168,6 +168,5 @@ class SyncWrapper:
|
|||
|
||||
def __exit__(self, exc_type, exc_val, tb):
|
||||
if hasattr(self.obj, "__aexit__"):
|
||||
return self._wrap("__aexit__")(exc_type, exc_val, tb)
|
||||
else:
|
||||
self.close()
|
||||
self._wrap("__aexit__")(exc_type, exc_val, tb)
|
||||
self.close()
|
||||
|
|
Loading…
Add table
Reference in a new issue