void-packages/srcpkgs/hplip/patches/gzip_text.patch
Heinrich Kruger 6f33e3848d hplip: Update to 3.21.10
Update hplip to latest upstream version and patch to fix Python 3.10
compatibility.
2021-12-07 20:05:25 -05:00

13 lines
619 B
Diff

Open gzipped PPD file in text mode, otherwise text regex search fails
--- a/setup.py 2021-10-18 18:37:49.795887272 +0100
+++ b/setup.py 2021-10-18 18:37:20.214898473 +0100
@@ -552,7 +552,7 @@
if os.path.exists(file_path) and os.path.isfile(file_path):
if file_path.endswith('.gz'):
- nickname = gzip.GzipFile(file_path, 'r').read(4096)
+ nickname = gzip.open(file_path, 'rt').read(4096)
else:
nickname = open(file_path, 'r').read(4096)