[asterisk-commits] lib/python/asterisk: Use old style inheritance call (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 27 18:36:31 CDT 2015


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

Change subject: lib/python/asterisk: Use old style inheritance call
......................................................................


lib/python/asterisk: Use old style inheritance call

In 98b77f234b03a8644fd71aec685a2a9db78fbab3, the parent object initializer
for the AriClientProtocol class was invoked for Autobahn 0.10.5-2+. However,
prior to that version (or at least on some older versions), the parent classes
were 'old-style' classes that did not inherit from Object. As a result, using
the new style invocation mechanism of 'super' causes an exception to be thrown
with older versions of Autobahn.

This patch uses the direct invocation method, thereby (hopefully) supporting
both new and old versions of Autobahn.

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

Approvals:
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved



diff --git a/lib/python/asterisk/ari.py b/lib/python/asterisk/ari.py
index 762f993..740c986 100644
--- a/lib/python/asterisk/ari.py
+++ b/lib/python/asterisk/ari.py
@@ -376,7 +376,7 @@
 
         :param receiver The event receiver
         """
-        super(AriClientProtocol, self).__init__()
+        WebSocketClientProtocol.__init__(self)
         LOGGER.debug("Made me a client protocol!")
         self.receiver = receiver
         self.factory = factory

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3bde314d8f6634e2bf58e46b39f963c82bac50f
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list