wmlscope: import glob for Windows shell

The Windows cmd shell will not expand a globbed argument by default, in
fact it will make the argument invalid. Importing and utilizing the glob
module is needed for x-platform.

Globbing is especially important for breaking up the subtree, so wmlscope
doesn't give off "more than one resource/definition is visible here"
errors.
This commit is contained in:
Groggy Dice 2014-08-01 04:34:56 -04:00
parent f55ab17ea7
commit 3d11b84611

View file

@ -92,7 +92,7 @@
#
# sets the warning level.
import sys, os, time, re, getopt, hashlib
import sys, os, time, re, getopt, hashlib, glob
from wesnoth.wmltools import *
def interpret(lines, css):
@ -433,7 +433,11 @@ Usage: wmlscope [options] dirpath
forceused = "|".join(forceused)
if len(arguments):
dirpath = arguments
dirpath = []
for arg in arguments:
globarg = glob.glob(arg)
for globbed in globarg:
dirpath.append(globbed)
else:
dirpath = ['.']
if not extracthelp: