added debug

This commit is contained in:
rootzoll 2020-01-21 21:14:03 +01:00
parent a533931728
commit dca974cbac
2 changed files with 5 additions and 1 deletions

View file

@ -111,7 +111,7 @@ class RaspiBlitzInfo(object):
"""load config from file"""
parser = ConfigParser()
log.debug("loading config from file: {}".format(self.abs_path))
log.info("loading RaspiBlitzInfo config from file: {}".format(self.abs_path))
with open(self.abs_path) as f:
parser.read_string("[{}]\n".format(DEFAULTSECT) + f.read())
@ -125,6 +125,7 @@ class RaspiBlitzInfo(object):
self.state = get_str_clean(default_s, "state", self.state)
self.undervoltage_reports = get_int_safe(default_s, "undervoltageReports", self.undervoltage_reports)
log.info("status --> {}".format(self.state))
def get_int_safe(cp_section, key, default_value):
"""take a ConfigParser section, get key that might be string encoded int and return int"""

View file

@ -177,6 +177,7 @@ class AppWindow(QMainWindow):
if not os.path.exists(rb_info_abs_path):
log.warning("file does not exist: {}".format(rb_info_abs_path))
log.info("init lnd.conf")
lnd_cfg_valid = False
self.lnd_cfg = LndConfig(lnd_cfg_abs_path)
try:
@ -185,6 +186,7 @@ class AppWindow(QMainWindow):
except Exception as err:
pass
log.info("init raspiblitz.conf")
rb_cfg_valid = False
self.rb_cfg = RaspiBlitzConfig(rb_cfg_abs_path)
try:
@ -193,6 +195,7 @@ class AppWindow(QMainWindow):
except Exception as err:
pass
log.info("init raspiblitz.info")
rb_info_valid = False
self.rb_info = RaspiBlitzInfo(rb_info_abs_path)
try: