diff --git a/ipa b/ipa index 6faa1648e..128eed383 100755 --- a/ipa +++ b/ipa @@ -68,11 +68,12 @@ if len(sys.argv) < 2: print 'Usage: ipa COMMAND [OPTIONS]' sys.exit(2) cmd = sys.argv[1] +pcmd = cmd.replace('-', '_') if cmd == '_api_': print_api() sys.exit() -elif cmd not in api.commands: +elif pcmd not in api.commands: print_commands() print 'ipa: ERROR: unknown command %r' % cmd sys.exit(2) -api.commands[cmd]() +api.commands[pcmd]() diff --git a/ipalib/base.py b/ipalib/base.py index 522b13b12..aa8670187 100644 --- a/ipalib/base.py +++ b/ipalib/base.py @@ -153,7 +153,10 @@ class Named(object): class AbstractCommand(object): def __call__(self): - print 'You called %s()' % self.name + print 'You called %s.%s()' % ( + self.__class__.__module__, + self.__class__.__name__ + ) def get_doc(self, _): """