mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
27: Added quick hack for replace('-', '_') problem I'm having
This commit is contained in:
5
ipa
5
ipa
@@ -68,11 +68,12 @@ if len(sys.argv) < 2:
|
|||||||
print 'Usage: ipa COMMAND [OPTIONS]'
|
print 'Usage: ipa COMMAND [OPTIONS]'
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
cmd = sys.argv[1]
|
cmd = sys.argv[1]
|
||||||
|
pcmd = cmd.replace('-', '_')
|
||||||
if cmd == '_api_':
|
if cmd == '_api_':
|
||||||
print_api()
|
print_api()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif cmd not in api.commands:
|
elif pcmd not in api.commands:
|
||||||
print_commands()
|
print_commands()
|
||||||
print 'ipa: ERROR: unknown command %r' % cmd
|
print 'ipa: ERROR: unknown command %r' % cmd
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
api.commands[cmd]()
|
api.commands[pcmd]()
|
||||||
|
|||||||
@@ -153,7 +153,10 @@ class Named(object):
|
|||||||
|
|
||||||
class AbstractCommand(object):
|
class AbstractCommand(object):
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
print 'You called %s()' % self.name
|
print 'You called %s.%s()' % (
|
||||||
|
self.__class__.__module__,
|
||||||
|
self.__class__.__name__
|
||||||
|
)
|
||||||
|
|
||||||
def get_doc(self, _):
|
def get_doc(self, _):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user