From 3869ccebe8196fe958aec361ffa1e5e5faec2cbb Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sun, 31 Oct 2010 11:17:51 +0000 Subject: [PATCH] Minor code refactoring --- lib/core/agent.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index fd8e6cde1..e3b083e25 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -637,11 +637,11 @@ class Agent: retVal = None if inpStr: - regObj = getCompiledRegex("(?P%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER)) + regObj = getCompiledRegex("%s(?P.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER)) match = regObj.search(inpStr) if match: - retVal = match.group("result")[1:-1] + retVal = match.group("result") return retVal