feat: add -Swp option

perf: tar.extractall wrapped in asyncio.to_thread
This commit is contained in:
2022-06-27 04:09:47 +07:00
parent aa147792e6
commit efc2abf858
3 changed files with 8 additions and 3 deletions

View File

@ -95,8 +95,8 @@ class Patcher:
if not archive:
raise RuntimeError("Cannot download patch repository")
with tarfile.open(archive) as tar:
tar.extractall(self._patch_path)
async with tarfile.open(archive) as tar:
await asyncio.to_thread(tar.extractall, self._patch_path)
def override_patch_url(self, url) -> None:
"""