Minor fix

This commit is contained in:
Miroslav Stampar 2013-02-13 16:24:21 +01:00
parent 9b231f87d6
commit 2b121c938b

View File

@ -1576,7 +1576,7 @@ def getSQLSnippet(dbms, sfile, **variables):
for _ in re.findall(r"%RANDINT\d+%", retVal, re.I):
retVal = retVal.replace(_, randomInt())
variables = re.findall(r"%(\w+)%", retVal, re.I)
variables = re.findall(r"(?<!\bLIKE\s*')%(\w+)%", retVal, re.I)
if variables:
errMsg = "unresolved variable%s '%s' in SQL file '%s'" % ("s" if len(variables) > 1 else "", ", ".join(variables), sfile)