Skip to content

Commit b12ba34

Browse files
committed
more PY2
1 parent 70f8085 commit b12ba34

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mig/shared/templates/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,21 @@
2525
# -- END_HEADER ---
2626
#
2727

28-
from collections import ChainMap
2928
import errno
3029
from jinja2 import meta as jinja2_meta, select_autoescape, Environment, \
3130
FileSystemLoader, FileSystemBytecodeCache
3231
import os
3332
import weakref
3433

34+
from mig.shared.compat import PY2
3535
from mig.shared.defaults import MIG_BASE
3636

37+
38+
if PY2:
39+
from chainmap import ChainMap
40+
else:
41+
from collections import ChainMap
42+
3743
TEMPLATES_DIR = os.path.abspath(os.path.dirname(__file__))
3844
TEMPLATES_CACHE_DIR = os.path.join(TEMPLATES_DIR, '__jinja__')
3945

0 commit comments

Comments
 (0)