From 867e87913d131c4ffeed34a785cda5d9300c44cd Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 7 Mar 2020 13:56:05 +0100 Subject: [PATCH] [modules/battery] Add warning log if no estimates --- modules/core/battery.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/core/battery.py b/modules/core/battery.py index 68fcf5c..92c2cea 100644 --- a/modules/core/battery.py +++ b/modules/core/battery.py @@ -14,10 +14,12 @@ Parameters: import os import glob import logging +log = logging.getLogger(__name__) + try: import power except ImportError: - pass + log.warning('unable to import module "power": Time estimates will not be available') import core.module import core.widget @@ -25,7 +27,6 @@ import core.input import util.format -log = logging.getLogger(__name__) class Module(core.module.Module): def __init__(self, config=None):