MCPcopy Create free account
hub / github.com/capstone-engine/capstone / __getattr__

Method __getattr__

bindings/python/capstone/__init__.py:780–794  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

778
779
780 def __getattr__(self, name):
781 if not self._cs._detail:
782 raise CsError(CS_ERR_DETAIL)
783
784 attr = object.__getattribute__
785 if not attr(self, '_cs')._detail:
786 raise AttributeError(name)
787 _dict = attr(self, '__dict__')
788 if 'operands' not in _dict:
789 self.__gen_detail()
790 if name not in _dict:
791 if self._raw.id == 0:
792 raise CsError(CS_ERR_SKIPDATA)
793 raise AttributeError(name)
794 return _dict[name]
795
796 # get the last error code
797 def errno(self):

Callers

nothing calls this directly

Calls 2

__gen_detailMethod · 0.95
CsErrorClass · 0.85

Tested by

no test coverage detected