diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-08-17 17:33:56 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-08-17 17:33:56 +0200 |
commit | a43f24af16de60fde3c2fa0ec312813d48349868 (patch) | |
tree | f943e3517ee222c659020d9b5b65450718dc0964 | |
parent | 84914bc4d8d7b224ce8883eb4eb5bb4a3340bfe5 (diff) |
DSM 6 docker error crash /sys/class/power_supply #1921
-rw-r--r-- | glances/__init__.py | 2 | ||||
-rw-r--r-- | glances/plugins/sensors/glances_batpercent.py | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/glances/__init__.py b/glances/__init__.py index 641f0681..ef3ce490 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -29,7 +29,7 @@ import sys # Global name # Version should start and end with a numerical char # See https://packaging.python.org/specifications/core-metadata/#version -__version__ = '3.2.4_Beta01' +__version__ = '3.2.4_Beta02' __author__ = 'Nicolas Hennion <nicolas@nicolargo.com>' __license__ = 'LGPLv3' diff --git a/glances/plugins/sensors/glances_batpercent.py b/glances/plugins/sensors/glances_batpercent.py index a77c3b60..fd566b1e 100644 --- a/glances/plugins/sensors/glances_batpercent.py +++ b/glances/plugins/sensors/glances_batpercent.py @@ -56,7 +56,14 @@ class Plugin(GlancesPlugin): stats_init_value=[]) # Init the sensor class - self.glancesgrabbat = GlancesGrabBat() + try: + self.glancesgrabbat = GlancesGrabBat() + except Exception as e: + logger.error("Can not init battery class ({})".format(e)) + global batinfo_tag + global psutil_tag + batinfo_tag = False + psutil_tag = False # We do not want to display the stat in a dedicated area # The HDD temp is displayed within the sensors plugin |