def _serial_close(self, port):
        '''
        Handle close request.

        Parameters
        ----------
        port : str
            Device name/port.
        '''
        if port in self.open_devices:
            try:
                self.open_devices[port].close()
            except Exception as exception:
                logger.error('Error closing device `%s`: %s', port, exception)
                return
        else:
            logger.debug('Device not connected to `%s`', port)
            self._publish_status(port)
            return
def _serial_close ( self , port ) : if port in self . open_devices : try : self . open_devices [ port ] . close ( ) except Exception as exception : logger . error ( 'Error closing device `%s`: %s' , port , exception ) return else : logger . debug ( 'Device not connected to `%s`' , port ) self . _publish_status ( port ) return
Handle close request.

        Parameters
        ----------
        port : str
            Device name/port.