Update setup.py and fix minor issues.

This commit is contained in:
grossmj committed 2018-09-02 15:32:33 +07:00
1 parent f89d645b56
commit 4a6202fa84
2 files changed
+10 -4

No files matched your search

@@ -87,6 +87,7 @@ class EthernetSwitch(Device):
self._mappings = {}
self._telnet_console = None
self._telnet_shell = None
self._telnet_server = None
self._console = self._manager.port_manager.get_free_tcp_port(self._project)
if ports is None:
# create 8 ports by default
@@ -217,8 +218,9 @@ class EthernetSwitch(Device):
Deletes this Ethernet switch.
"""
yield from self._telnet.close()
self._telnet_server.close()
if self._telnet_server:
self._telnet_server.close()
for nio in self._nios.values():
if nio:
yield from nio.close()