sort options to make --help output prettier

explicitly sort options when adding them to argparse.
it's a bit silly to print them in a dict iteration order.

Change-Id: Id508331d7ee3b24e76be7fa958d27d29905bd3d2
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-02-13 14:01:46 +09:00 committed by Mark McLoughlin
parent b1730fcbc4
commit 16c4ecbefc
1 changed files with 1 additions and 1 deletions

View File

@ -1643,7 +1643,7 @@ class ConfigOpts(collections.Mapping):
"""
self._args = args
for opt, group in self._all_cli_opts():
for opt, group in sorted(self._all_cli_opts()):
opt._add_to_cli(self._oparser, group)
return vars(self._oparser.parse_args(args))