def delete(self, p_timestamp=None, p_write=True):
        """ Removes backup from the backup file. """
        timestamp = p_timestamp or self.timestamp
        index = self._get_index()

        try:
            del self.backup_dict[timestamp]
            index.remove(index[[change[0] for change in index].index(timestamp)])
            self._save_index(index)

            if p_write:
                self._write()
        except KeyError:
            pass
def delete ( self , p_timestamp = None , p_write = True ) : timestamp = p_timestamp or self . timestamp index = self . _get_index ( ) try : del self . backup_dict [ timestamp ] index . remove ( index [ [ change [ 0 ] for change in index ] . index ( timestamp ) ] ) self . _save_index ( index ) if p_write : self . _write ( ) except KeyError : pass
Removes backup from the backup file.