Bug 257512 - print/hplip hp-toolbox problem
Summary: print/hplip hp-toolbox problem
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tijl Coosemans
Depends on:
Reported: 2021-07-30 19:49 UTC by Vladimir Mišev
Modified: 2021-07-30 21:44 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (tijl)

replace platform.dist with platform.libc_ver() (318 bytes, text/plain)
2021-07-30 19:49 UTC, Vladimir Mišev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Mišev 2021-07-30 19:49:09 UTC
Created attachment 226807 [details]
replace platform.dist with platform.libc_ver()

print/hplip pkg installs ok, printing works, but hp-toolbox crashes.
Problem is in base/password.py which calls depreciated/non-existent platform.dist()

Changing that to platform.libc_vers() makes hp-tools start without problem.

I’m not sure should distro.linux_distribution() be removed as well.

--- base/password.py.orig	2021-07-30 21:24:44.609836000 +0200
+++ base/password.py
@@ -82,7 +82,7 @@
         os_name = None
-        os_name = platform.dist()[0]
+        os_name = platform.libc_ver()[0]
     except AttributeError:
         import distro
         os_name = distro.linux_distribution()[0]
Comment 1 Vladimir Mišev 2021-07-30 21:44:10 UTC
(In reply to Vladimir Mišev from comment #0)
Sorry, I made a typo in my description:


Patch is ok.