Skip to content

Fix small bug in hwmon.py with Python <3.9#483

Merged
jonasmalacofilho merged 1 commit intoliquidctl:mainfrom
maclarsson:main
Jul 24, 2022
Merged

Fix small bug in hwmon.py with Python <3.9#483
jonasmalacofilho merged 1 commit intoliquidctl:mainfrom
maclarsson:main

Conversation

@maclarsson
Copy link
Contributor

@maclarsson maclarsson commented Jul 23, 2022

Change PosixPath.readlink() to PosixPath.resolve() for compatibility with Python <3.9

The .readlink() function is not available in the pathlib library prior to Python 3.9. Replacing it with a call to .resolve() for the same result.

Fixes:
Closes: #481
Related:


Checklist:

  • Adhere to the development process
  • Conform to the style guide
  • Verify that the changes work as expected on real hardware
  • Add automated tests cases
  • Verify that all (other) automated tests (still) pass
  • Update the README and other applicable documentation pages
  • Update the liquidctl.8 Linux/Unix/Mac OS man page
  • Update or add applicable docs/*guide.md device guides
  • Submit relevant data, scripts or dissectors to https://github.com/liquidctl/collected-device-data

New CLI flag?

  • Adjust the completion scripts in extra/completions/

New device?

  • Regenerate extra/linux/71-liquidctl.rules (instructions in the file header)
  • Add entry to the README's supported device list with applicable notes (at least en)

New driver?

  • Document the protocol in docs/developer/protocol/

Change PosixPath.readlink() to PosixPath.resolve() for compatibility with Python <3.9
@jonasmalacofilho jonasmalacofilho merged commit 01f8999 into liquidctl:main Jul 24, 2022
@jonasmalacofilho
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AttributeError: 'PosixPath' object has no attribute 'readlink' with Commander Pro

2 participants