Browse Source

diff_tree: Use built-in defaultdict module correctly.

Change-Id: I41073969ce02ee2e26c812a62d9e583b6c5525a3
Dave Borowitz 13 years ago
parent
commit
3b35b6b7b1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      dulwich/diff_tree.py

+ 5 - 1
dulwich/diff_tree.py

@@ -18,12 +18,16 @@
 
 """Utilities for diffing files and trees."""
 
+try:
+    from collections import defaultdict
+except ImportError:
+    from dulwich._compat import defaultdict
+
 from cStringIO import StringIO
 import itertools
 import stat
 
 from dulwich._compat import (
-    defaultdict,
     namedtuple,
     )
 from dulwich.objects import (