Example #1
0
 def _cmp(self, other):
     # Note reversed name ordering
     bc = bytescmp(other.name, self.name)
     if bc != 0:
         return bc
     vc = self.is_valid() - other.is_valid()
     if vc != 0:
         return vc
     fc = self.is_fake() - other.is_fake()
     if fc != 0:
         return fc
     return 0
Example #2
0
File: index.py Project: bup/bup
 def _cmp(self, other):
     # Note reversed name ordering
     bc = bytescmp(other.name, self.name)
     if bc != 0:
         return bc
     vc = self.is_valid() - other.is_valid()
     if vc != 0:
         return vc
     fc = self.is_fake() - other.is_fake()
     if fc != 0:
         return fc
     return 0