Ejemplo n.º 1
0
 def __getattr__(self, name):
     """ Spacewalk backend still use errmsg, let have errmsg as alias to value """
     if name == 'errmsg':
         return self.value
     else:
         if hasattr(PmBaseError, '__getattr__'):
             # rhel5 has no __getattribute__()
             return PmBaseError.__getattr__(self, name)
         else:
             if name in self.__dict__:
                 return self.__dict__[name]
             else:
                 raise AttributeError(_("class %s has no attribute '%s'") % (self.__class__.__name__, name))
Ejemplo n.º 2
0
 def __getattr__(self, name):
     """ Spacewalk backend still use errmsg, let have errmsg as alias to value """
     if name == 'errmsg':
         return self.value
     else:
         if hasattr(PmBaseError, '__getattr__'):
             # rhel5 has no __getattribute__()
             return PmBaseError.__getattr__(self, name)
         else:
             if name in self.__dict__:
                 return self.__dict__[name]
             else:
                 raise AttributeError(_("class %s has no attribute '%s'") % (self.__class__.__name__, name))