diff options
Diffstat (limited to 'psutil/_pslinux.py')
-rw-r--r-- | psutil/_pslinux.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index beddb8b6..8fc0bb6d 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1143,8 +1143,8 @@ def sensors_battery(): except ZeroDivisionError: percent = 0.0 else: - percent = int(cat(root + "/capacity", fallback=null)) - if percent == null: + percent = int(cat(root + "/capacity", fallback=-1)) + if percent == -1: return None # Is AC power cable plugged in? |