- raise AttributeError("'%s' object has no attribute '%s'" %
- (self.__class__.__name__, attr))
+ command = command.replace("_", " ")
+ if command not in self._commands:
+ raise AttributeError("'%s' object has no attribute '%s'" %
+ (self.__class__.__name__, attr))