'Deletes all partial swift downloads, also clean up obsolete .mhash and .mbinmap files.'

def _delete_swift_files(self):

    def update_status():
        progress = 1.0
        if (self.total_swift_file_count > 0):
            progress = (float(self.swift_files_deleted) / self.total_swift_file_count)
        progress *= 100
        self.status_update_func((u'Deleting    swift    files    %.1f%%...' % progress))
    for (root, _, files) in os.walk(self.torrent_collecting_dir):
        for name in files:
            if (name.endswith(u'.mbinmap') or name.endswith(u'.mhash') or name.startswith(u'tmp_')):
                os.unlink(os.path.join(root, name))
                self.swift_files_deleted += 1
                self.processed_file_count += 1
                update_status()
        break
