Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/commands.py
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
def list_commands(*args, **kw): | def list_commands(*args, **kw): | ||||
""" | """ | ||||
List commands | List commands | ||||
""" | """ | ||||
__commands = {} | __commands = {} | ||||
for command in commands.keys(): | for command in commands: | ||||
if isinstance(command, tuple): | if isinstance(command, tuple): | ||||
command_group, command = command | command_group, command = command | ||||
__commands[command_group] = { | __commands[command_group] = { | ||||
command: commands[(command_group,command)] | command: commands[(command_group,command)] | ||||
} | } | ||||
else: | else: | ||||
__commands[command] = commands[command] | __commands[command] = commands[command] | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |