Skip to content

Sometimes get_object_list(...) returns None instead of [] or raising an exception #478

@pslacerda1

Description

@pslacerda1

Makes sense to change cmd.get_object_list(...) to return empty lists instead of None in case of empty selections?

def get_object_list(selection="(all)", quiet=1, *, _self=cmd):
        '''
        
DESCRIPTION

    "get_object_list" is an unsupported command that may have
    something to do with querying the objects covered by a selection.
    '''
        selection = selector.process(selection)
        with _self.lockcm:
            r = _cmd.get_object_list(_self._COb,str(selection))
            r = r or []
            if not quiet:
                print(" get_object_list: ",str(r))
        return r

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions