def disconnect(self, device):
        """Disconnect using protocol specific method."""
        # self.device.ctrl.sendcontrol(']')
        # self.device.ctrl.sendline('quit')
        self.log("TELNET disconnect")
        try:
            self.device.ctrl.send(chr(4))
        except OSError:
            self.log("Protocol already disconnected")
def disconnect ( self , device ) : self . log ( "TELNET disconnect" ) try : self . device . ctrl . send ( chr ( 4 ) ) except OSError : self . log ( "Protocol already disconnected" )
Disconnect using protocol specific method.