mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tools: pyterm: properly handle custom output fmt
This commit is contained in:
parent
11a0422b83
commit
486ca73308
9
dist/tools/pyterm/pyterm
vendored
9
dist/tools/pyterm/pyterm
vendored
@ -126,9 +126,10 @@ class SerCmd(cmd.Cmd):
|
||||
self.json_regs = dict()
|
||||
self.init_cmd = []
|
||||
self.load_config()
|
||||
self.fmt_str = None
|
||||
if not self.fmt_str:
|
||||
if self.fmt_str == None:
|
||||
self.fmt_str = default_fmt_str
|
||||
else:
|
||||
self.fmt_str = str(self.fmt_str.replace('"', '')) + "%(message)s"
|
||||
|
||||
# check for a history file
|
||||
try:
|
||||
@ -459,7 +460,9 @@ class SerCmd(cmd.Cmd):
|
||||
"""Internal function to laod configuration from file.
|
||||
"""
|
||||
self.config = configparser.SafeConfigParser()
|
||||
self.config.read([self.configdir + os.path.sep + self.configfile])
|
||||
cf = os.path.join(self.configdir, self.configfile)
|
||||
self.config.read(cf)
|
||||
logging.getLogger("").info("Reading file: %s" % cf)
|
||||
|
||||
for sec in self.config.sections():
|
||||
if sec == "filters":
|
||||
|
Loading…
Reference in New Issue
Block a user