Skip to content

Commit

Permalink
Remove ChainMap
Browse files Browse the repository at this point in the history
  • Loading branch information
Glandos authored Jul 26, 2018
1 parent c06c5d4 commit 1ec9a5c
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions systemd/journal.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
import logging as _logging
from syslog import (LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR,
LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG)
if _sys.version_info >= (3,3):
from collections import ChainMap as _ChainMap

from ._journal import __version__, sendv, stream_fd
from ._reader import (_Reader, NOP, APPEND, INVALIDATE,
Expand Down Expand Up @@ -172,15 +170,9 @@ def __init__(self, flags=None, path=None, files=None, converters=None):
flags = 0

super(Reader, self).__init__(flags, path, files)
if _sys.version_info >= (3, 3):
self.converters = _ChainMap()
if converters is not None:
self.converters.maps.append(converters)
self.converters.maps.append(DEFAULT_CONVERTERS)
else:
self.converters = DEFAULT_CONVERTERS.copy()
if converters is not None:
self.converters.update(converters)
self.converters = DEFAULT_CONVERTERS.copy()
if converters is not None:
self.converters.update(converters)

def _convert_field(self, key, value):
"""Convert value using self.converters[key].
Expand Down

0 comments on commit 1ec9a5c

Please sign in to comment.