doctool: Sort input filenames when generating indexes

Order of inputs may not be pre-sorted if the shell does not
sort arguments before passing them to commands. As shells are
not required to sort arguments, make sure they are sorted in
doctool itself.
This commit is contained in:
Adrian Perez 2011-11-30 22:41:12 +02:00 committed by Manuel Rego Casasnovas
parent ec8bb95b62
commit bc7e16ef1d

View file

@ -240,7 +240,7 @@ class DocTool(object):
out = DupRefsRemover(sys.stdout)
for name in args:
for name in sorted(args):
if not name.endswith(".rst"):
continue
@ -263,7 +263,7 @@ class DocTool(object):
f.close()
print
for name in args:
for name in sorted(args):
# Skip non-RST inputs
if not name.endswith(".rst"):
continue