(self,prefix,a,b)
return cmp(int(a_indx), int(b_indx))
Compare the backup directory indexes numerically
Compare the backup directory indexes numerically
Compare the backup directory indexes numerically
def order_backupdirs(self,prefix,a,b):
        """Compare the backup directory indexes numerically"""
        prefix = os.path.abspath(prefix)

        a_indx = a[len(prefix)+1:]
        if not a_indx:
            a_indx = -1
        b_indx = b[len(prefix)+1:]
        if not b_indx:
            b_indx = -1
        return cmp(int(a_indx), int(b_indx))
def order_backupdirs ( self , prefix , a , b ) : prefix = os . path . abspath ( prefix ) a_indx = a [ len ( prefix ) + 1 : ] if not a_indx : a_indx = - 1 b_indx = b [ len ( prefix ) + 1 : ] if not b_indx : b_indx = - 1 return cmp ( int ( a_indx ) , int ( b_indx ) )