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:
parent
2933bbce56
commit
61546d55e0
4
dist/tools/pyterm/pyterm
vendored
4
dist/tools/pyterm/pyterm
vendored
@ -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 +
|
||||
|
Loading…
Reference in New Issue
Block a user