This is useful when you commit samba-tool tests before you commit the
samba-tool code, and you want the tests to fail rather than error.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
epilog = "\nAvailable subcommands:\n"
subcmds = sorted(self.subcommands.keys())
- max_length = max([len(c) for c in subcmds])
+ max_length = max([len(c) for c in subcmds], default=0)
for cmd_name in subcmds:
cmd = self.subcommands[cmd_name]
if cmd.hidden: