Skip to content
Merged
Changes from all commits
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
10 changes: 9 additions & 1 deletion cupshelpers/openprinting.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,19 @@ def parse_result (status, data, result):
if isinstance(model, Device):
model = model.id

architecture = platform.machine()

# On Intel, we could be running a 32bit user space with a 64bit kernel, in
# which case platform.machine() will return x86_64, leading to downloading
# the wrong printer driver, so we make sure we ask for i386 in that case.
if architecture == 'x86_64' and platform.architecture()[0] == '32bit':
architecture = 'i386'

params = { 'type': 'drivers',
'moreinfo': '1',
'showprinterid': '1',
'onlynewestdriverpackages': '1',
'architectures': platform.machine(),
'architectures': architecture,
'noobsoletes': '1',
'onlyfree': str (self.onlyfree),
'onlymanufacturer': str (self.onlymanufacturer),
Expand Down