Voice et bot modif

This commit is contained in:
pi 2026-06-16 17:09:34 +00:00
parent 189d56026b
commit 7333a22bcd
10774 changed files with 634644 additions and 933308 deletions

View file

@ -122,3 +122,14 @@ class TarFileSystem(AbstractArchiveFileSystem):
if details["type"] != "file":
raise ValueError("Can only handle regular files")
return self.tar.extractfile(path)
def close(self):
"""Commits any write changes to the file. Done on ``del`` too."""
self.tar.close()
def __del__(self):
if hasattr(self, "tar"):
self.close()
del self.tar
if hasattr(self, "of") and hasattr(self.of, "__exit__"):
self.of.__exit__(None, None, None)