]> git.cworth.org Git - apitrace/commitdiff
Fix diffing between blobs and null.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 5 Oct 2012 19:55:43 +0000 (20:55 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Fri, 5 Oct 2012 19:55:43 +0000 (20:55 +0100)
scripts/tracediff2.py

index 0f59d87983df51be1a23bb8400c3c601d172402b..255191e8c5bf93bd9a744ef558b4c28e7f386e2d 100755 (executable)
@@ -58,7 +58,7 @@ class Blob:
         return 'blob(%u)' % self.size
 
     def __eq__(self, other):
-        return self.size == other.size and self.hash == other.hash
+        return isinstance(other, Blob) and self.size == other.size and self.hash == other.hash
 
     def __hash__(self):
         return self.hash