diff options
-rw-r--r-- | poezio/logger.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/poezio/logger.py b/poezio/logger.py index cda190b3..c14b9036 100644 --- a/poezio/logger.py +++ b/poezio/logger.py @@ -120,7 +120,7 @@ class Logger(object): return filename = log_dir / room try: - fd = open(filename, 'a', encoding='utf-8') + fd = filename.open('a', encoding='utf-8') self._fds[room] = fd return fd except IOError: @@ -149,7 +149,7 @@ class Logger(object): filename = log_dir / jid try: - fd = open(filename, 'rb') + fd = filename.open('rb') except FileNotFoundError: log.info( 'Non-existing log file (%s)', @@ -228,8 +228,8 @@ class Logger(object): filename = log_dir / 'roster.log' if not self._roster_logfile: try: - self._roster_logfile = open( - filename, 'a', encoding='utf-8') + self._roster_logfile = filename.open( + 'a', encoding='utf-8') except IOError: log.error( 'Unable to create the log file (%s)', |