[modules/battery] Add warning log if no estimates

This commit is contained in:
Tobias Witek 2020-03-07 13:56:05 +01:00
parent 7cdcde0080
commit 867e87913d

View file

@ -14,10 +14,12 @@ Parameters:
import os import os
import glob import glob
import logging import logging
log = logging.getLogger(__name__)
try: try:
import power import power
except ImportError: except ImportError:
pass log.warning('unable to import module "power": Time estimates will not be available')
import core.module import core.module
import core.widget import core.widget
@ -25,7 +27,6 @@ import core.input
import util.format import util.format
log = logging.getLogger(__name__)
class Module(core.module.Module): class Module(core.module.Module):
def __init__(self, config=None): def __init__(self, config=None):