diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-07-21 01:58:22 +0000 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-07-21 01:58:22 +0000 |
commit | 0c574d830062d7957c2c65081e3e66fc0bb41759 (patch) | |
tree | dcd90f7c2ce372086108868f606d4d3c34caf186 | |
parent | 7273d48169a6c0dabc1bfb0f42bafb06515fdac9 (diff) | |
download | freeipa-0c574d830062d7957c2c65081e3e66fc0bb41759.tar.gz freeipa-0c574d830062d7957c2c65081e3e66fc0bb41759.tar.xz freeipa-0c574d830062d7957c2c65081e3e66fc0bb41759.zip |
27: Added quick hack for replace('-', '_') problem I'm having
-rwxr-xr-x | ipa | 5 | ||||
-rw-r--r-- | ipalib/base.py | 5 |
2 files changed, 7 insertions, 3 deletions
@@ -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, _): """ |