1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dist/tools/pyterm: accept absolute log dir name

This commit is contained in:
Benjamin Valentin 2024-01-29 11:08:54 +01:00
parent 2933bbce56
commit 61546d55e0

View File

@ -153,7 +153,7 @@ class SerCmd(cmd.Cmd):
self.run_name = defaultrunname
if not self.log_dir_name:
self.log_dir_name = self.host
self.log_dir_name = self.configdir + os.path.sep + self.host
if not os.path.exists(self.configdir):
os.makedirs(self.configdir)
@ -183,7 +183,7 @@ class SerCmd(cmd.Cmd):
# create formatter
formatter = logging.Formatter(self.fmt_str)
directory = self.configdir + os.path.sep + self.log_dir_name
directory = self.log_dir_name
if not os.path.exists(directory):
os.makedirs(directory)
logging.basicConfig(filename=directory + os.path.sep + self.run_name +