Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Python >= 3.3 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions logaugment/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import collections
import logging
import sys
if (sys.version_info.major, sys.version_info.minor) >= (3, 3):
from collections.abc import Mapping
else:
from collections import Mapping

__title__ = 'logaugment'
__version__ = '0.1.3'
__version__ = '0.1.4'
__author__ = 'Simeon Visser'
__email__ = '[email protected]'
__license__ = 'MIT'
Expand All @@ -22,7 +26,7 @@ def filter(self, record):
data = self._args(record)
except TypeError:
pass
if not data and isinstance(self._args, collections.Mapping):
if not data and isinstance(self._args, Mapping):
data = self._args
if data and not hasattr(record, '_logaugment'):
record._logaugment = {}
Expand Down