void-packages/srcpkgs/hplip/patches/gzip_text.patch

14 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)