summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_tables.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_tables.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_tables.py
index 8917cd28..75adf9e3 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_tables.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_tables.py
@@ -1,3 +1,4 @@
+import sys
from texttable import Texttable
from .text_opts import format_text
@@ -23,7 +24,11 @@ def generate_trex_stats_table():
def print_table_with_header(texttable_obj, header="", untouched_header=""):
header = header.replace("_", " ").title() + untouched_header
print(format_text(header, 'cyan', 'underline') + "\n")
- print((texttable_obj.draw() + "\n"))
+
+ if sys.version_info < (3,0):
+ print((texttable_obj.draw().encode('utf-8') + "\n"))
+ else:
+ print((texttable_obj.draw() + "\n"))
if __name__ == "__main__":
pass