mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
added debug
This commit is contained in:
parent
a533931728
commit
dca974cbac
2 changed files with 5 additions and 1 deletions
|
@ -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"""
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue