If comment is available, use it for a name #75

This commit is contained in:
tomaae 2020-12-25 09:27:47 +01:00
parent cef6710f1b
commit d601a055fd

View file

@ -406,6 +406,9 @@ class MikrotikControllerMangleSwitch(MikrotikControllerSwitch):
@property
def name(self) -> str:
"""Return the name of the Mangle switch."""
if self._data["comment"]:
return f"{self._inst} Mangle {self._data['comment']}"
return f"{self._inst} Mangle {self._data['name']}"
@property