SHA256
5
0
forked from pool/hplip
Files
hplip/hp-setup-fix-python-crash-when-manually-importing-gz.patch
Hans-Peter Jansen 27c815a4ba Accepting request 1299909 from home:mwilck:branches:Printing
- Fix verification of HP plugin with new GPG key (lp#2120738)
  * add hplip-hardcode-new-signing-key-AC69536A2CF3A243.patch
- Fix python crash in hp-setup on compressed PPD file (lp#2120739)
  * add hp-setup-fix-python-crash-when-manually-importing-gz.patch
- Fix missing urllib.URLopener in python 3.14 (lp#2115046)
  * add hplip-no-urlopener.patch
- Only run cupstestppd if explicitly requested with "--with testppd"
  build parameter

- Updated hplip gpg public key
  fingerprint: 82FF A7C6 AA74 11D9 34BD E173 AC69 536A 2CF3 A243
  https://developers.hp.com/hp-linux-imaging-and-printing/hplipDigitalCertificate.html
- Update to hplip 3.25.6
- Added support for new printers:
  * HP LaserJet Enterprise Flow MFP 8601z
  * HP LaserJet Pro MFP M126a plus
  * HP LaserJet Pro MFP M126nw plus
  * HP LaserJet Pro MFP M126snw plus
  * HP Envy Photo 7200 series
  * HP Envy Photo 7900 series
  * HP OfficeJet Pro 9110 Series
  * HP OfficeJet 9120 Series
  * HP OfficeJet Pro 9120 Series
  * HP OfficeJet Pro 9130 Series

OBS-URL: https://build.opensuse.org/request/show/1299909
OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=273
2025-08-19 14:25:36 +00:00

29 lines
1.0 KiB
Diff

From 216b15eb68bd5cacd26ff554e244fc4ea50a1acf Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Fri, 15 Aug 2025 23:10:44 +0200
Subject: [PATCH 1/2] hp-setup: fix python crash when manually importing
gzipped PPD
data read from gzip.GzipFile must be converted to a string, otherwise
the subsequent regex match will cause a python stacktrace.
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 2608f95..962909b 100755
--- a/setup.py
+++ b/setup.py
@@ -552,7 +552,7 @@ else: # INTERACTIVE_MODE
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.GzipFile(file_path, 'r').read(4096).decode("utf-8")
else:
nickname = open(file_path, 'r').read(4096)
--
2.50.1