Logger: consolidate a bit of file path creation

This commit is contained in:
Georg Lukas 2021-12-10 14:52:29 +01:00
parent e1a75a5ced
commit 2c59fa067a

View file

@ -205,7 +205,7 @@ class Logger:
return None
if not open_fd:
return None
filename = self.log_dir / jid
filename = self.get_file_path(jid)
try:
fd = filename.open('a', encoding='utf-8')
self._fds[jid] = fd
@ -259,7 +259,7 @@ class Logger:
if option_fd is None:
return True
fd = option_fd
filename = self.log_dir / jidstr
filename = self.get_file_path(jid)
try:
if not force and self._busy_fds.get(jidstr):
self._buffered_fds[jidstr].append(logged_msg)