mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
python/samba/netcmd: PY3 fix CI error for samba.tests.samba_tool.help
Strangely the test was failing on CI only, looks like there is an issue with order of elements returned from dict.items() with python3.4 (version of python in CI docker instance) and python3.6 (version on my development machine). Changed code to sort the keys so order of help printed out should be the same for each invocation. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c11e90a123
commit
25b16fa064
@ -138,7 +138,8 @@ class Command(object):
|
||||
prog=prog, epilog=epilog)
|
||||
parser.add_options(self.takes_options)
|
||||
optiongroups = {}
|
||||
for name, optiongroup in self.takes_optiongroups.items():
|
||||
for name in sorted(self.takes_optiongroups.keys()):
|
||||
optiongroup = self.takes_optiongroups[name]
|
||||
optiongroups[name] = optiongroup(parser)
|
||||
parser.add_option_group(optiongroups[name])
|
||||
return parser, optiongroups
|
||||
|
Loading…
Reference in New Issue
Block a user