INNER CODE UNIT · Python
__getattr__
mpenning/ciscoconfparse · ciscoconfparse/ccp_abc.py:136
def __getattr__(self, attr):
try:
retval = getattr(object, attr)
return retval
except BaseException:
error = f"The {attr} attribute does not exist"
logger.error(error)
raise AttributeError(error)
# On BaseCfgLine()
@logger.catch(reraise=True)
def __eq__(self, val):
try:
## try / except is much faster than isinstance();
## I added hash_arg() inline below for speed... whenever I change
## self.__hash__() I *must* change this
# FIXME
return hash(str(self.linenum) + self.text) == hash(