Fix warning in mustclose decorator
This commit is contained in:
parent
e241c13bf1
commit
52e674a192
|
@ -38,7 +38,8 @@ def must_close(errorfile = sys.stderr, wrap_verify = False):
|
|||
|
||||
@wrap_class_method
|
||||
def close(orig, self, *args, **kwargs):
|
||||
del self._must_close
|
||||
if "_must_close" in self.__dict__:
|
||||
del self._must_close
|
||||
return orig(self, *args, **kwargs)
|
||||
|
||||
# Optionally wrap all other functions
|
||||
|
|
Loading…
Reference in New Issue
Block a user