Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions cupshelpers/ppds.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,12 +1157,9 @@ def _init_ids (self):
lmfg = id_dict['MFG'].lower ()
lmdl = id_dict['MDL'].lower ()

bad = False
if len (lmfg) == 0:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding at least debugprint call if the MFG is empty? Just to be sure.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Output looks like this:


 PM-241-BT
4 PPDs with empty MFG in their device ID, indexed under the empty make
**** Device ID has an empty MFG field; matching on MDL alone
Trying make/model names
init_makes: 0.170s
mfgl: pm 241 bt
mdll:
make: None
Checking CMD field
exact-cmd: PM-241-BT-open.ppd
Removed set() due to CMD mis-match
Valid driver types for this printer in priority order: ['driverless', 'manufacturer-cmd', 'foomatic-recommended-nonpostscript', 'manufacturer-ricoh-ps', 'manufacturer-ricoh-pxl', 'manufacturer', 'pdf', 'foomatic-recommended-postscript', 'hpcups', 'splix', 'foomatic-postscript', 'gutenprint-simplified', 'gutenprint-expert', 'foomatic-gutenprint', 'foomatic', 'cups', 'generic-postscript', 'generic-foomatic-recommended', 'generic-pcl6', 'generic-pcl5e', 'generic-pcl5', 'generic-pcl', 'generic-escp', 'ghostscript', 'generic', 'foomatic-recommended-hpijs', 'hpijs', 'foomatic-hpijs', 'hpcups-plugin', 'hpijs-plugin', 'turboprint']
PPDs with assigned driver types in priority order: [('manufacturer-cmd', 'PM-241-BT-open.ppd')]
Resulting PPD list in priority order: ['PM-241-BT-open.ppd']
DESTROY: <asyncconn.Connection object at 0x7fffdb6b5d10>
DESTROY: <asyncpk1.PK1Connection object at 0x7fffdb6b5f90>
DESTROY: <asyncipp.IPPAuthConnection object at 0x7fffdb6b6490>
Stopping worker thread
Next task: None
Thread exiting
-<asyncipp._IPPAuthOperation object at 0x7fffdb6b6990>
<ppdsloader.PPDsLoader object at 0x7fffdb697840 (ppdsloader+PPDsLoader at 0x555556d59c70)>: stored error is None
DESTROY: <ppdsloader.PPDsLoader object at 0x7fffdb697840 (ppdsloader+PPDsLoader at 0x555556d59c70)>
Loaded PPDs this time; try nextNPTab again...
Next clicked on page 1

 PM-241-BT
**** Device ID has an empty MFG field; matching on MDL alone
Trying make/model names
mfgl: pm 241 bt
mdll:
make: None
Checking CMD field
exact-cmd: PM-241-BT-open.ppd
Removed set() due to CMD mis-match
Suitable PPDs found: {'PM-241-BT-open.ppd': 'exact-cmd'}

@codewiz codewiz Aug 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note the annoying blank space before the human readable printer name (" PM-241-BT"). We might want to add a strip() somewhere.

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:
Expand Down