equal
deleted
inserted
replaced
127 def __getattribute__(self, name): |
127 def __getattribute__(self, name): |
128 try: |
128 try: |
129 return object.__getattribute__(self, name) |
129 return object.__getattribute__(self, name) |
130 except AttributeError: |
130 except AttributeError: |
131 cmd = 'cmd_%s' % name |
131 cmd = 'cmd_%s' % name |
132 if hasattr(self, cmd): |
132 # search self.__class__ to avoid infinite recursion |
|
133 if hasattr(self.__class__, cmd): |
133 meth = getattr(self, cmd) |
134 meth = getattr(self, cmd) |
134 return lambda *args, **kwargs: self.interact(args, kwargs, |
135 return lambda *args, **kwargs: self.interact(args, kwargs, |
135 meth=meth) |
136 meth=meth) |
136 raise |
137 raise |
137 raise AttributeError(name) |
138 raise AttributeError(name) |