<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/9125">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Try construct.legacy as Python module first.<br><br>Since version 2.6, the Python module 'construct' is not forward compatible. Some<br>disitributions still offer version 2.5 via<br> import construct_legacy<br><br>Until the Asterisk Test Suite is updated, let us first try to import the legacy<br>version. For example since Ubuntu 18.04 LTS, you go for<br> sudo apt install python-construct.legacy<br><br>ASTERISK-27893<br><br>Change-Id: Ia5a6b205e222156bb9f0adca4611fbe879d2bd1c<br>---<br>M lib/python/asterisk/pcap.py<br>M tests/channels/SIP/pcap_demo/run-test<br>M tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py<br>M tests/hep/hep_capture_node.py<br>4 files changed, 18 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/lib/python/asterisk/pcap.py b/lib/python/asterisk/pcap.py<br>index ee1020d..d39574a 100644<br>--- a/lib/python/asterisk/pcap.py<br>+++ b/lib/python/asterisk/pcap.py<br>@@ -19,8 +19,12 @@<br> <br> from twisted.internet.protocol import DatagramProtocol<br> from twisted.internet import reactor<br>-from construct import *<br>-from construct.protocols.ipstack import ip_stack<br>+try:<br>+ from construct_legacy import *<br>+ from construct_legacy.protocols.ipstack import ip_stack<br>+except ImportError:<br>+ from construct import *<br>+ from construct.protocols.ipstack import ip_stack<br> try:<br> from yappcap import PcapOffline<br> PCAP_AVAILABLE = True<br>diff --git a/tests/channels/SIP/pcap_demo/run-test b/tests/channels/SIP/pcap_demo/run-test<br>index bc0f27c..7b3122b 100755<br>--- a/tests/channels/SIP/pcap_demo/run-test<br>+++ b/tests/channels/SIP/pcap_demo/run-test<br>@@ -11,7 +11,10 @@<br> from sip_message import SIPMessage, SIPMessageTest<br> <br> from twisted.internet import reactor<br>-from construct.protocols.ipstack import ip_stack<br>+try:<br>+ from construct_legacy.protocols.ipstack import ip_stack<br>+except ImportError:<br>+ from construct.protocols.ipstack import ip_stack<br> <br> logger = logging.getLogger(__name__)<br> test1 = [<br>diff --git a/tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py b/tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py<br>index 38ff430..2e325f5 100644<br>--- a/tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py<br>+++ b/tests/channels/pjsip/rtp/rtp_keepalive/base/rtp.py<br>@@ -13,7 +13,10 @@<br> from twisted.internet.protocol import DatagramProtocol<br> from twisted.internet import reactor<br> <br>-from construct import *<br>+try:<br>+ from construct_legacy import *<br>+except ImportError:<br>+ from construct import *<br> <br> sys.path.append('lib/python')<br> <br>diff --git a/tests/hep/hep_capture_node.py b/tests/hep/hep_capture_node.py<br>index 8170213..f663056 100644<br>--- a/tests/hep/hep_capture_node.py<br>+++ b/tests/hep/hep_capture_node.py<br>@@ -21,7 +21,10 @@<br> from twisted.internet.protocol import DatagramProtocol<br> from twisted.internet import reactor<br> <br>-from construct import *<br>+try:<br>+ from construct_legacy import *<br>+except ImportError:<br>+ from construct import *<br> <br> LOGGER = logging.getLogger(__name__)<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9125">change 9125</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9125"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 15.4 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia5a6b205e222156bb9f0adca4611fbe879d2bd1c </div>
<div style="display:none"> Gerrit-Change-Number: 9125 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>