Files
mayan-edms/mayan/apps/common/compat.py
Roberto Rosario 73546bd99f PEP8 cleanups
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-05-03 01:57:41 -04:00

25 lines
521 B
Python

from __future__ import unicode_literals
import types
from django.utils import six
if six.PY3:
dict_type = dict
dictionary_type = dict
else:
dict_type = types.DictType
dictionary_type = types.DictionaryType
try:
from email.Utils import collapse_rfc2231_value # NOQA
except ImportError:
from email.utils import collapse_rfc2231_value # NOQA
try:
FileNotFoundError
except NameError:
FileNotFoundErrorException = IOError
else:
FileNotFoundErrorException = FileNotFoundError # NOQA