From: Noel Power Date: Mon, 15 Oct 2018 15:23:07 +0000 (+0100) Subject: samba-tool: PY3 dict view doesn't have sort method, X-Git-Tag: tdb-1.3.17~1261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=842f09aaa7b5f0210d3250facbdf745feedd6ef2;p=thirdparty%2Fsamba.git samba-tool: PY3 dict view doesn't have sort method, Can't sort a dict view, create a list from view then use list.sort Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 0687016c6d7..2b874d22d1f 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -247,7 +247,7 @@ class SuperCommand(Command): subcommand = '--help' epilog = "\nAvailable subcommands:\n" - subcmds = self.subcommands.keys() + subcmds = list(self.subcommands.keys()) subcmds.sort() max_length = max([len(c) for c in subcmds]) for cmd_name in subcmds: