def process_objectlist(self, objects):
    assert isinstance(objects, list)
    for s in objects:
        if hasattr(s, 'held_object'):
            s = s.held_object
        if isinstance(s, (str, File, ExtractedObjects)):
            self.objects.append(s)
        elif isinstance(s, (GeneratedList, CustomTarget)):
            msg = ((("Generated files are not allowed in the 'objects' kwarg " + 'for target {!r}.\nIt is meant only for '.format(self.name)) + 'pre-built object files that are shipped with the\nsource ') + 'tree. Try adding it in the list of sources.')
            raise InvalidArguments(msg)
        else:
            msg = 'Bad object of type {!r} in target {!r}.'.format(type(s).__name__, self.name)
            raise InvalidArguments(msg)
def process_objectlist(self, objects):
    assert isinstance(objects, list)
    for s in objects:
        if hasattr(s, 'held_object'):
            s = s.held_object
        if isinstance(s, (str, File, ExtractedObjects)):
            self.objects.append(s)
        elif isinstance(s, (GeneratedList, CustomTarget)):
            msg = ((("Generated files are not allowed in the 'objects' kwarg " + 'for target {!r}.\nIt is meant only for '.format(self.name)) + 'pre-built object files that are shipped with the\nsource ') + 'tree. Try adding it in the list of sources.')
            raise InvalidArguments(msg)
        else:
            msg = 'Bad object of type {!r} in target {!r}.'.format(type(s).__name__, self.name)
            raise InvalidArguments(msg)