def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum, docLocation=self.docLocation) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M')): if not name.startswith('MPx'): try: info = parser.parse(name) self.apiClassInfo[name] = info except (IOError, OSError, ValueError, IndexError), e: import errno baseMsg = "failed to parse docs for %r:" % name if isinstance( e, (IOError, OSError)) and e.errno == errno.ENOENT: # If we couldn't parse because we couldn't find the # file, only raise a warning... there are many classes # (ie, MClothTriangle) that don't have a doc page... _logger.warning(baseMsg) _logger.warning("%s: %s" % (name, e)) else: import traceback _logger.error(baseMsg) _logger.error(traceback.format_exc())
def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M') ): if not name.startswith( 'MPx' ): try: info = parser.parse(name) self.apiClassInfo[ name ] = info except (IOError, ValueError,IndexError), e: _logger.warn( "failed to parse docs for %r:\n%s" % (name, e) )
def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M')): if not name.startswith('MPx'): try: info = parser.parse(name) self.apiClassInfo[name] = info except (IOError, ValueError, IndexError), e: _logger.warn("failed to parse docs for %r:\n%s" % (name, e))
def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum, docLocation=self.docLocation) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M') ): if not name.startswith( 'MPx' ): try: info = parser.parse(name) self.apiClassInfo[ name ] = info except (IOError, OSError, ValueError,IndexError), e: import errno _logger.warn( "failed to parse docs for %r:" % name) if isinstance(e, (IOError, OSError)) and e.errno == errno.ENOENT: _logger.warn("%s" % name, e) else: import traceback _logger.warn(traceback.format_exc())
def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum, docLocation=self.docLocation) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M') ): if not name.startswith( 'MPx' ): try: info = parser.parse(name) self.apiClassInfo[ name ] = info except (IOError, OSError, ValueError,IndexError), e: import errno _logger.warn( "failed to parse docs for %r:" % name) if isinstance(e, (IOError, OSError)) and e.errno == errno.ENOENT: _logger.warn("%s: %s" % (name, e)) else: import traceback _logger.warn(traceback.format_exc())
def _buildApiClassInfo(self): from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} # try: parser = ApiDocParser(api) # except IOError, msg: # _logger.warn( "failed to find docs for current version: %s", name ) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M') ): if not name.startswith( 'MPx' ): try: try: info = parser.parse(name) self.apiClassInfo[ name ] = info except IOError: _logger.warn( "failed to parse docs: %s", name ) except (ValueError,IndexError), msg: _logger.warn( "failed %s %s" % ( name, msg ) )
def _buildApiClassInfo(self): _logger.debug("Starting ApiCache._buildApiClassInfo...") from pymel.internal.parsers import ApiDocParser self.apiClassInfo = {} parser = ApiDocParser(api, enumClass=ApiEnum, docLocation=self.docLocation) for name, obj in inspect.getmembers( api, lambda x: type(x) == type and x.__name__.startswith('M') ): if not name.startswith( 'MPx' ): try: info = parser.parse(name) self.apiClassInfo[ name ] = info except (IOError, OSError, ValueError,IndexError), e: import errno baseMsg = "failed to parse docs for %r:" % name if isinstance(e, (IOError, OSError)) and e.errno == errno.ENOENT: # If we couldn't parse because we couldn't find the # file, only raise a warning... there are many classes # (ie, MClothTriangle) that don't have a doc page... _logger.warning(baseMsg) _logger.warning("%s: %s" % (name, e)) else: import traceback _logger.error(baseMsg) _logger.error(traceback.format_exc())