Exemple #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
Exemple #2
0
Fichier : index.py Projet : 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