[Asterisk-code-review] asterisk.py: cli error callback attempted to iterate over an... (testsuite[master])

Kevin Harwell asteriskteam at digium.com
Tue Jan 26 18:14:18 CST 2016


Kevin Harwell has uploaded a new change for review.

  https://gerrit.asterisk.org/2097

Change subject: asterisk.py: cli_error_callback attempted to iterate over an object type
......................................................................

asterisk.py: cli_error_callback attempted to iterate over an object type

When the defer errback is called when issuing a CLI command it referenced the
passed in result as a tuple when it is actually a tuple wrapped in a 'Failure'
object. This makes it so set_properties receives the actual tuple value.

Change-Id: I99299ebf73e4b76407efedd64e95339fc145b6e1
---
M lib/python/asterisk/asterisk.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/97/2097/1

diff --git a/lib/python/asterisk/asterisk.py b/lib/python/asterisk/asterisk.py
index 855c621..b98f2ce 100755
--- a/lib/python/asterisk/asterisk.py
+++ b/lib/python/asterisk/asterisk.py
@@ -187,7 +187,7 @@
 
         def __cli_error_callback(result):
             """Errback from getProcessOutputAndValue"""
-            self._set_properties(result)
+            self._set_properties(result.value)
             LOGGER.warning("Asterisk CLI %s exited %d with error: %s" %
                            (self.host, self.exitcode, self.err))
             if self.err:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99299ebf73e4b76407efedd64e95339fc145b6e1
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