mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
The Python re module doesn't count parens so remove any trailing ) from notfound
This commit is contained in:
@@ -535,7 +535,10 @@ def notfound(args):
|
|||||||
if len(args) > 2:
|
if len(args) > 2:
|
||||||
searchfilter = args[2]
|
searchfilter = args[2]
|
||||||
try:
|
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 = re.match(r'\(.*=(.*)\)', searchfilter).group(1)
|
||||||
|
target.replace(")","")
|
||||||
except:
|
except:
|
||||||
target = searchfilter
|
target = searchfilter
|
||||||
return "%s not found" % str(target)
|
return "%s not found" % str(target)
|
||||||
|
|||||||
Reference in New Issue
Block a user