aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-05-14 10:51:15 +0200
committerJan Gelety <jgelety@cisco.com>2019-05-16 12:16:26 +0000
commitac259ea21d8663dbdaea21589bace5f5f8ea94c7 (patch)
treedbdb4e71deabf6bb7a5dcdcfb6fc72f6af5c878e /resources/tools
parent0903fff5fdd647e4b5357c107219142738d377e9 (diff)
Avoid !r format appending u on unicode
Change-Id: I2c0877f4d8b6cad2694c43a4350998cd2b830680 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/tools')
-rwxr-xr-xresources/tools/trex/trex_stateless_profile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/resources/tools/trex/trex_stateless_profile.py b/resources/tools/trex/trex_stateless_profile.py
index 9b629754ca..aa68a014b8 100755
--- a/resources/tools/trex/trex_stateless_profile.py
+++ b/resources/tools/trex/trex_stateless_profile.py
@@ -245,6 +245,10 @@ def simple_burst(profile_file, duration, framesize, rate, warmup_time, port_0,
else:
if client:
client.disconnect()
+ if isinstance(rate, unicode):
+ rate = rate.encode("utf-8")
+ if isinstance(duration, unicode):
+ duration = duration.encode("utf-8")
print("rate={0!r}, totalReceived={1}, totalSent={2}, "
"frameLoss={3}, latencyStream0(usec)={4}, "
"latencyStream1(usec)={5}, targetDuration={d!r}".