[Asterisk-code-review] ami.py: CelRequirement class has no "match" attribute (testsuite[master])

Kevin Harwell asteriskteam at digium.com
Wed Jun 10 11:35:11 CDT 2015


Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/620

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 CelRequrement 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(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/20/620/1

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: newchange
Gerrit-Change-Id: I960d2a1751d1f3afad30300c552d1c47f88ef8eb
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list