[asterisk-commits] sgriepentrog: testsuite/asterisk/trunk r4640 - /asterisk/trunk/lib/python/ast...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 31 16:51:11 CST 2014


Author: sgriepentrog
Date: Fri Jan 31 16:51:08 2014
New Revision: 4640

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4640
Log:
testsuite: autobahn 0.8.0 has moved websocket

Caught import failure to retry in new path so that
ari.py works with either version.

Review: https://reviewboard.asterisk.org/r/3171/


Modified:
    asterisk/trunk/lib/python/asterisk/ari.py

Modified: asterisk/trunk/lib/python/asterisk/ari.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/ari.py?view=diff&rev=4640&r1=4639&r2=4640
==============================================================================
--- asterisk/trunk/lib/python/asterisk/ari.py (original)
+++ asterisk/trunk/lib/python/asterisk/ari.py Fri Jan 31 16:51:08 2014
@@ -16,8 +16,12 @@
 
 from test_case import TestCase
 from twisted.internet import reactor
-from autobahn.websocket import WebSocketClientFactory, \
-    WebSocketClientProtocol, connectWS
+try:
+    from autobahn.websocket import WebSocketClientFactory, \
+        WebSocketClientProtocol, connectWS
+except:
+    from autobahn.twisted.websocket import WebSocketClientFactory, \
+        WebSocketClientProtocol, connectWS
 
 LOGGER = logging.getLogger(__name__)
 




More information about the asterisk-commits mailing list