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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 28 10:28:28 CST 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

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

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



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: merged
Gerrit-Change-Id: I99299ebf73e4b76407efedd64e95339fc145b6e1
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list