From 5ad47d70bee9858506fbff5a9327ca081deea495 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 10 Dec 2008 16:41:36 -0500 Subject: [PATCH] The Python re module doesn't count parens so remove any trailing ) from notfound --- ipa_server/ipaldap.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipa_server/ipaldap.py b/ipa_server/ipaldap.py index 215ef683f..e7c56e5d6 100644 --- a/ipa_server/ipaldap.py +++ b/ipa_server/ipaldap.py @@ -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)