diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-11 14:37:05 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-11 14:37:05 +0300 |
commit | 64e65af6ac803afdc038d5bc64754186f09f7686 (patch) | |
tree | c11887c52f3146040f585d3cb02302f2bebcc128 /testxml/testxml.py | |
parent | 4d992247afa0895b6dafb357ae28ead68f359d88 (diff) | |
download | evol-tools-64e65af6ac803afdc038d5bc64754186f09f7686.tar.gz evol-tools-64e65af6ac803afdc038d5bc64754186f09f7686.tar.bz2 evol-tools-64e65af6ac803afdc038d5bc64754186f09f7686.tar.xz evol-tools-64e65af6ac803afdc038d5bc64754186f09f7686.zip |
testxml: add check for executable files.
Diffstat (limited to 'testxml/testxml.py')
-rwxr-xr-x | testxml/testxml.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/testxml/testxml.py b/testxml/testxml.py index 7f67c17..cd1f58c 100755 --- a/testxml/testxml.py +++ b/testxml/testxml.py @@ -147,12 +147,20 @@ def enumDirs(parentDir): file2 = os.path.abspath(parentDir + os.path.sep + file1) if not os.path.isfile(file2): enumDirs(file2) - elif filt.search(file1): - try: - minidom.parse(file2) - except xml.parsers.expat.ExpatError as err: - print "error: " + file2 + ", line=" + str(err.lineno) + ", char=" + str(err.offset) - errors = errors + 1 + else: + if filt.search(file1): + try: + minidom.parse(file2) + except xml.parsers.expat.ExpatError as err: + print "error: " + file2 + ", line=" + str(err.lineno) + ", char=" + str(err.offset) + errors = errors + 1 + if file1 != "testxml.py": + checkFilePermission(file2) + +def checkFilePermission(fullName): + if os.access(fullName, os.X_OK): + print "warn: execute flag on file: " + fullName + def loadPaths(): global warnings, iconsDir, spritesDir, sfxDir, particlesDir, mapsDir, attackSfxFile, spriteErrorFile, \ |