aboutsummaryrefslogtreecommitdiff
path: root/deskutils/calibre/files/patch-setup_iso__codes.py
diff options
context:
space:
mode:
Diffstat (limited to 'deskutils/calibre/files/patch-setup_iso__codes.py')
-rw-r--r--deskutils/calibre/files/patch-setup_iso__codes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/deskutils/calibre/files/patch-setup_iso__codes.py b/deskutils/calibre/files/patch-setup_iso__codes.py
index e23074d72157..f2a1fb04871c 100644
--- a/deskutils/calibre/files/patch-setup_iso__codes.py
+++ b/deskutils/calibre/files/patch-setup_iso__codes.py
@@ -1,4 +1,4 @@
---- setup/iso_codes.py.orig 2025-04-18 03:14:01 UTC
+--- setup/iso_codes.py.orig 2025-10-01 15:30:07 UTC
+++ setup/iso_codes.py
@@ -2,6 +2,7 @@ import fnmatch
# License: GPLv3 Copyright: 2023, Kovid Goyal <kovid at kovidgoyal.net>
@@ -25,7 +25,7 @@
- with open(opts.path_to_isocodes, 'rb') as f:
- self._zip_data = f.read()
- # get top level directory
-- top = {item.split('/')[0] for item in zipfile.ZipFile(self.zip_data).namelist()}
+- top = {item.split('/')[0] for item in zipfile.ZipFile(BytesIO(self.zip_data)).namelist()}
- assert len(top) == 1
- self.top_level_filename = top.pop()
+ if opts.isocodes_extracted:
@@ -36,7 +36,7 @@
+ with open(opts.path_to_isocodes, 'rb') as f:
+ self._zip_data = f.read()
+ # get top level directory
-+ top = {item.split('/')[0] for item in zipfile.ZipFile(self.zip_data).namelist()}
++ top = {item.split('/')[0] for item in zipfile.ZipFile(BytesIO(self.zip_data)).namelist()}
+ assert len(top) == 1
+ self.top_level_filename = top.pop()