From 5e727474efe18b3800df6130c068e668fadd2e0b Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 23 Mar 2016 09:19:46 +0200 Subject: Python 3 - another drop (package fixups) --- scripts/stl/udp_1pkt_simple_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/stl/udp_1pkt_simple_test.py') diff --git a/scripts/stl/udp_1pkt_simple_test.py b/scripts/stl/udp_1pkt_simple_test.py index b2f80233..3915412d 100644 --- a/scripts/stl/udp_1pkt_simple_test.py +++ b/scripts/stl/udp_1pkt_simple_test.py @@ -2,9 +2,9 @@ from trex_stl_lib.api import * def generate_payload(length): word = '' - alphabet_size = len(string.letters) + alphabet_size = len(string.ascii_letters) for i in range(length): - word += string.letters[(i % alphabet_size)] + word += string.ascii_letters[(i % alphabet_size)] return word @@ -12,7 +12,7 @@ class STLS1(object): def create_stream (self): fsize_no_fcs = 129 - base_pkt_a = Ether()/IP(dst="48.0.0.1",options=IPOption('\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) + base_pkt_a = Ether()/IP(dst="48.0.0.1",options=IPOption(b'\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) vm1 = STLScVmRaw([ STLVmFlowVar(name="src",min_value="10.0.0.1",max_value="10.0.0.10",size=4,op="inc"), -- cgit 1.2.3-korg