From 738da2c0cd38f13a3cf7ae726f7698959ebf1ff0 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 21 Mar 2016 17:22:06 +0200 Subject: python 3 - examples working --- .../automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py index 75e15ca1..e501c185 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py @@ -31,9 +31,14 @@ import argparse import tempfile import subprocess import os -from dpkt import pcap from operator import itemgetter +# HACK +import sys +if sys.version_info < (3, 0): + from dpkt import pcap +# HACK END + class BpSimException(Exception): pass -- cgit 1.2.3-korg