From 4d9008f0dff048e407020f524fb6cd6f4006ff26 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Tue, 14 Jul 2026 10:59:22 +0900 Subject: [PATCH] cupshelpers: let PPDs with a blank MFG match their device Some printers report an empty MFG in their IEEE 1284 device ID. Index those PPDs under the empty make instead of dropping them, so the exact match becomes symmetric with the lookup side. MDL is still required. Fixes #445 Assisted-by: Claude:claude-fable-5 [Claude Code] --- cupshelpers/ppds.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cupshelpers/ppds.py b/cupshelpers/ppds.py index dac4d9fad..4ee611cdf 100755 --- a/cupshelpers/ppds.py +++ b/cupshelpers/ppds.py @@ -1157,12 +1157,9 @@ def _init_ids (self): lmfg = id_dict['MFG'].lower () lmdl = id_dict['MDL'].lower () - bad = False - if len (lmfg) == 0: - bad = True + # A blank MFG is legal (some devices report one); index the + # PPD under the empty make so blank-MFG device IDs can match. if len (lmdl) == 0: - bad = True - if bad: continue if lmfg not in ids: