diff options
Diffstat (limited to 'ipalib/cli.py')
-rw-r--r-- | ipalib/cli.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipalib/cli.py b/ipalib/cli.py index 374429f46..f60dc927d 100644 --- a/ipalib/cli.py +++ b/ipalib/cli.py @@ -790,11 +790,11 @@ class help(frontend.Local): if type(t[2]) is dict): self.print_commands(name, outfile) elif name == "commands": - mcl = max(len(s) for s in (self.Command)) - for cname in self.Command: - cmd = self.Command[cname] + mcl = 0 + for cmd in self.Command(): if cmd.NO_CLI: continue + mcl = max(mcl, len(cmd.name)) writer('%s %s' % (to_cli(cmd.name).ljust(mcl), cmd.summary)) else: raise HelpError(topic=name) |