The Python re module doesn't count parens so remove any trailing ) from notfound

This commit is contained in:
Rob Crittenden 2008-12-10 16:41:36 -05:00
parent c34d2b8923
commit 5ad47d70be

View File

@ -535,7 +535,10 @@ def notfound(args):
if len(args) > 2:
searchfilter = args[2]
try:
# Python re doesn't do paren counting so the string could
# have a trailing paren "foo)"
target = re.match(r'\(.*=(.*)\)', searchfilter).group(1)
target.replace(")","")
except:
target = searchfilter
return "%s not found" % str(target)