def listdir(directory):
    swift = _get_swift_client()
    directory = directory.strip('/')

    files = []
    try:
        objects = swift.get_container(directory)[1]
        for o in objects:
            file_path = '/' + directory + '/' + o['name']
            files.append(File(file_path))
    except swift_exc.ClientException as e:
        if e.http_status == 404:
            msg = directory % "Directory '%s' does not exist."
            raise exceptions.InvalidDirectoryError(msg)
        else:
            raise exceptions.FileSystemAccessError()

    return files
dataset/ETHPy150Open openstack/python-rackclient/rackclient/lib/syscall/default/file.py/listdir/swapped operands of `%`