This commit is contained in:
Kovid Goyal 2024-06-28 08:15:31 +05:30
parent 5e8a9456a2
commit 4804084665
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -50,6 +50,8 @@ class ISOData(Command):
def extract_po_files(self, name: str, output_dir: str) -> None:
name = name.split('.', 1)[0]
pat = f'{self.top_level}/{name}/*.po'
if self.zip_data is None:
self._zip_data = BytesIO(download_securely(self.URL))
with zipfile.ZipFile(self.zip_data) as zf:
for name in fnmatch.filter(zf.namelist(), pat):
dest = os.path.join(output_dir, name.split('/')[-1])