Skip to content

Bug in get_peer_name in Element? #257

@TeresiaOlsson

Description

@TeresiaOlsson

In Element there is the following function:

    def get_peer_name(self) -> str:
        """
        Returns a string representation of peer simulator or control system
        """
        return "None" if self._peer is None else f"{self._peer.__class__.__name__}:{self._peer.name()}"

If I understand correctly peer is an ElementHolder but ElementHolder doesn't seem to have a function name or any other attributes/functions related to name. Is this a bug?

Also, is this function really needed since there is also a property for peer so if peer has an attribute name can't you just get it with peer.name without needing a dedicated function for it in the Element class?

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