hp-plugin tracebacks when used with python3.8

Bug #1843037 reported by zdohnal
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HPLIP
Fix Committed
Undecided
Unassigned

Bug Description

Hi,

I have an issue in Fedora rawhide https://bugzilla.redhat.com/show_bug.cgi?id=1745317 , where we already have python3.8. Traceback is following:

  File "/usr/bin/hp-plugin", line 367, in <module>
    status, plugin_path, error_str = pluginObj.download(plugin_path, plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 254, in download
    core = core_install.CoreInstall()
  File "/usr/share/hplip/installer/core_install.py", line 240, in __init__
    self.passwordObj = password.Password(ui_mode)
  File "/usr/share/hplip/base/password.py", line 113, in __init__
    self.__readAuthType() # self.__authType
  File "/usr/share/hplip/base/password.py", line 135, in __readAuthType
    distro_name = get_distro_name().lower()
  File "/usr/share/hplip/base/password.py", line 81, in get_distro_name
    os_name = platform.dist()[0]
AttributeError: module 'platform' has no attribute 'dist'

It is due platform module does not have dist() method in python3.8. It is recommended to use distro module.

I wrote a patch for fixing it, would you mind adding it to the project?

Best regards,

Zdenek Dohnal
Fedora/RHEL hplip maintainer

Revision history for this message
zdohnal (zdohnal) wrote :
Revision history for this message
zdohnal (zdohnal) wrote :

Sorry, previous patch contained indentation error, this one is ok.

Changed in hplip:
status: New → In Progress
Revision history for this message
Umesh Mahindrakar (umesh.mahindrakar) wrote :

Hi,

Thanks for the patch, we will incorporate this fix in our next release.

Changed in hplip:
status: In Progress → Fix Committed
Revision history for this message
Lukas (lukasw-24) wrote :

Are there any updates on when (and if) this patch will be merged? I'm affected by this issue as well, see the related question.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.