wmllint: activate wildcard globbing on Windows

The Windows cmd shell does not expand wildcards by default, unlike UNIX shells. This imports glob.glob and runs arguments through it on Windows.

This will be frontported once I'm done on this branch and ready to check out master again.
This commit is contained in:
Groggy Dice 2013-07-08 03:14:42 -04:00
parent 5962eef8ea
commit 7bee47a956

View file

@ -2151,6 +2151,15 @@ if __name__ == '__main__':
if arg.endswith('"'):
arguments[i] = arg[:-1]
# Also, Windows does not expand wildcards. This turns on globbing.
if sys.platform == 'win32':
from glob import glob
for arg in arguments:
wildarg = glob(arg)
arguments.remove(arg)
for newarg in wildarg:
arguments.append(newarg)
for dir in arguments:
ofp = None
if "older" in versions: