Skip to content

Commit

Permalink
try to fix py26 legacy.
Browse files Browse the repository at this point in the history
  • Loading branch information
c0fec0de committed Mar 13, 2017
1 parent 86f9511 commit 2a6fcc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions anytree/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
"""

from __future__ import print_function
try:
from collections import OrderedDict
except ImportError:
from future.moves.collections import OrderedDict

import collections
import re
import six

Expand Down Expand Up @@ -543,7 +546,7 @@ def __start(self, node, path):
def __get_nodemap(self, node):
subnodes = [(self.__get_part(child), child)
for child in node.children]
return collections.OrderedDict(subnodes)
return OrderedDict(subnodes)

def __glob(self, node, parts):
nodes = []
Expand Down

0 comments on commit 2a6fcc2

Please sign in to comment.