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

Matt Jordan asteriskteam at digium.com
Sun Sep 27 18:34:59 CDT 2015


Matt Jordan has uploaded a new change for review.

  https://gerrit.asterisk.org/1330

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


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/30/1330/1

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: newchange
Gerrit-Change-Id: Ic3bde314d8f6634e2bf58e46b39f963c82bac50f
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list