summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2021-12-10 14:52:29 +0100
committerGeorg Lukas <georg@op-co.de>2021-12-11 19:06:09 +0100
commit2c59fa067af90bc116953f2ae162f5da4c1b6002 (patch)
treec4a5685959fd86ddd85e7f2c7f6197e369513f84
parente1a75a5cedbef8a669c1156a681ce95096aacc5a (diff)
downloadpoezio-2c59fa067af90bc116953f2ae162f5da4c1b6002.tar.gz
poezio-2c59fa067af90bc116953f2ae162f5da4c1b6002.tar.bz2
poezio-2c59fa067af90bc116953f2ae162f5da4c1b6002.tar.xz
poezio-2c59fa067af90bc116953f2ae162f5da4c1b6002.zip
Logger: consolidate a bit of file path creation
-rw-r--r--poezio/logger.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/logger.py b/poezio/logger.py
index 9a901836..4b7856da 100644
--- a/poezio/logger.py
+++ b/poezio/logger.py
@@ -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)