fixed: order of file comparison was reversed

This commit is contained in:
lars 2006-11-07 13:48:30 +00:00
parent 6a7b740e07
commit 0db04d7f8c
1 changed files with 8 additions and 3 deletions

View File

@ -61,12 +61,17 @@ def compareFiles(langFile1, langFile2):
## check for missing keys (only part of the first (master) file)
for key in hdfKeys1:
if not key in hdfKeys2:
if key.endswith(".Link.Abs") or key.endswith(".Link.Prot") or key.endswith(".Link.Rel"):
## ignore link attributes
pass
elif not key in hdfKeys2:
print "\tmissing key: %s" % key
## check for superfluous keys (only part of the second file)
for key in hdfKeys2:
if not key in hdfKeys1:
if key.endswith(".Link.Abs") or key.endswith(".Link.Prot") or key.endswith(".Link.Rel"):
print "\tyou should not override link attributes: %s" % key
elif not key in hdfKeys1:
print "\tsuperfluous key: %s" % key
@ -102,5 +107,5 @@ os.path.walk(os.getcwd(), find_lang_file, obj)
for langFile in obj["list"]:
refLang = langFile.replace("/%s%s" % (DEFAULT_LANGUAGE, SUFFIX), "/%s%s" % (language, SUFFIX))
compareFiles(refLang, langFile)
compareFiles(langFile, refLang)