Skip to content

Conversation

@bdrung
Copy link
Contributor

@bdrung bdrung commented Jun 30, 2025

Summary

Description

The test TestModuleFunctionsLeaks.test_sensors_battery fails on Ubuntu s390x in sensors_battery with:

FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/power_supply'

Fix sensors_battery to return None in case POWER_SUPPLY_PATH does not exist.

@bdrung bdrung force-pushed the missing-power-supply branch from bdedc8b to b7bb733 Compare June 30, 2025 12:01
@bdrung bdrung force-pushed the missing-power-supply branch from b7bb733 to 11fa37b Compare October 17, 2025 12:55
The test `TestModuleFunctionsLeaks.test_sensors_battery` fails on Ubuntu
s390x in `sensors_battery` with:

```
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/power_supply'
```

Fix `sensors_battery` to return `None` in case `POWER_SUPPLY_PATH` does
not exist.

Fixes: giampaolo#2067
Signed-off-by: Benjamin Drung <[email protected]>
@bdrung bdrung force-pushed the missing-power-supply branch from 11fa37b to 7dcea77 Compare October 21, 2025 09:08
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.

[Linux/Docker] hasattr(psutil, 'sensors_battery') returns True even when a battery isn't available:

1 participant