[asterisk-commits] ami.py: CelRequirement class has no "match" attribute (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 10 12:08:54 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: ami.py: CelRequirement class has no "match" attribute
......................................................................


ami.py: CelRequirement class has no "match" attribute

When making changes for the "escape-pattern" option the regex pattern
matching function was modified for CelRequirement class when it should
not have been since it does not inherit from AMIEventInstance. This
patch reverts the changes to that class.

Change-Id: I960d2a1751d1f3afad30300c552d1c47f88ef8eb
---
M lib/python/asterisk/ami.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, approved; Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/lib/python/asterisk/ami.py b/lib/python/asterisk/ami.py
index 8958c8b..f0583c8 100644
--- a/lib/python/asterisk/ami.py
+++ b/lib/python/asterisk/ami.py
@@ -368,7 +368,7 @@
                     extra_item = item.get(extra_key.lower())
                     if extra_item is None:
                         continue
-                    extra_match = self.match(extra_item, str(extra_value))
+                    extra_match = re.match(extra_item, str(extra_value))
                     if extra_match is None \
                             or extra_match.end() != len(str(extra_value)):
                         LOGGER.debug('Skipping %s - %s does not equal %s for '
@@ -376,7 +376,7 @@
                                      extra_item, str(extra_value), extra_key)
                         return False
             else:
-                match = self.match(item, value)
+                match = re.match(item, value)
                 if match is None or match.end() != len(value):
                     LOGGER.debug('Skipping %s - %s does not equal %s '
                                  'for field %s', event['eventname'], item,

-- 
To view, visit https://gerrit.asterisk.org/620
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I960d2a1751d1f3afad30300c552d1c47f88ef8eb
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list