[asterisk-commits] twilson: testsuite/asterisk/trunk r226 - /asterisk/trunk/lib/python/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 15 11:50:25 CDT 2010
Author: twilson
Date: Thu Apr 15 11:50:23 2010
New Revision: 226
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=226
Log:
Add implicit front/end anchors to regex match
Modified:
asterisk/trunk/lib/python/asterisk/cdr.py
Modified: asterisk/trunk/lib/python/asterisk/cdr.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/cdr.py?view=diff&rev=226&r1=225&r2=226
==============================================================================
--- asterisk/trunk/lib/python/asterisk/cdr.py (original)
+++ asterisk/trunk/lib/python/asterisk/cdr.py Thu Apr 15 11:50:23 2010
@@ -44,8 +44,8 @@
"""
for k,v in self.iteritems():
- if None not in (v, other.get(k)) and not re.search(
- str(v).lower(), str(other.get(k)).lower()):
+ if None not in (v, other.get(k)) and not re.match(
+ "%s$" % (str(v).lower()), str(other.get(k)).lower()):
print "CDR MATCH FAILED, Expected: %s:%s Got: %s:%s" % (k, v,
k, other.get(k))
return False
More information about the asterisk-commits
mailing list