From a86f881d83dfbbbf7b931ef24c895f544012709e Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 23 May 2019 15:57:08 +0700 Subject: [PATCH] Avoid sending warning message all the time for Ethernet switch. --- gns3server/compute/dynamips/nodes/ethernet_switch.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gns3server/compute/dynamips/nodes/ethernet_switch.py b/gns3server/compute/dynamips/nodes/ethernet_switch.py index 62baecb7..fa296a95 100644 --- a/gns3server/compute/dynamips/nodes/ethernet_switch.py +++ b/gns3server/compute/dynamips/nodes/ethernet_switch.py @@ -132,10 +132,11 @@ class EthernetSwitch(Device): @console_type.setter def console_type(self, console_type): - if console_type == "telnet": - self.project.emit("log.warning", { - "message": '"{name}": Telnet access for switches is not available in this version of GNS3'.format(name=self._name)}) - self._console_type = console_type + if self._console_type != console_type: + if console_type == "telnet": + self.project.emit("log.warning", { + "message": '"{name}": Telnet access for switches is not available in this version of GNS3'.format(name=self._name)}) + self._console_type = console_type @property def ports_mapping(self):