def handle(self): try: while not self.__login_processor.process(): continue while self.__command_processor.process(): continue except: LOGGER.error( sys.exc_info()[1], sys.exc_info()[2] )
def handle(self): try: while not self._login_processor.process(): continue while self._command_processor.process(): continue except Exception as e: if isinstance(e, NotImplementedError): return if isinstance(e, IOError) and e.errno == 32: return LOGGER.error(sys.exc_info()[1], sys.exc_info()[2])
def __import_command_handler(self, module_name): if module_name in sys.modules: if self.__has_source_file_changed(module_name): LOGGER.debug('reloading module: "%s"' % module_name) reload(sys.modules[module_name]) LOGGER.debug('reloaded module: "%s"' % module_name) else: try: LOGGER.debug('importing module: "%s"' % module_name) __import__(module_name) LOGGER.debug('imported module: "%s"' % module_name) except ImportError: LOGGER.error('module: "%s" does not exist' % module_name)