2
0
Эх сурвалжийг харах

Merge fix for handling None elements in list of TreeChange objects.

Jelmer Vernooij 12 жил өмнө
parent
commit
a186ff8a29
2 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 2 0
      NEWS
  2. 3 0
      dulwich/walk.py

+ 2 - 0
NEWS

@@ -28,6 +28,8 @@
   * Commit._deserialize now actually deserializes the current state rather than
     the previous one. (Yifan Zhang, issue #59)
 
+  * Handle None elements in lists of TreeChange objects. (Alex Holmes)
+
 0.8.5	2012-03-29
 
  BUG FIXES

+ 3 - 0
dulwich/walk.py

@@ -255,6 +255,9 @@ class Walker(object):
         return False
 
     def _change_matches(self, change):
+        if not change:
+            return False
+
         old_path = change.old.path
         new_path = change.new.path
         if self._path_matches(new_path):