From 1fa7b64c13e6c485926eba5c40bd198af738e365 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 18 Apr 2016 13:13:00 +0300 Subject: simple intro while connecting to the server --- .../trex_control_plane/stl/trex_stl_lib/utils/text_opts.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_opts.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_opts.py index bc2d44f4..5c0dfb14 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_opts.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/text_opts.py @@ -124,16 +124,9 @@ def underline(text): def text_attribute(text, attribute): - if isinstance(text, str): - return "{start}{txt}{stop}".format(start=TEXT_CODES[attribute]['start'], - txt=text, - stop=TEXT_CODES[attribute]['end']) - elif isinstance(text, unicode): - return u"{start}{txt}{stop}".format(start=TEXT_CODES[attribute]['start'], - txt=text, - stop=TEXT_CODES[attribute]['end']) - else: - raise Exception("not a string") + return "{start}{txt}{stop}".format(start=TEXT_CODES[attribute]['start'], + txt=text, + stop=TEXT_CODES[attribute]['end']) FUNC_DICT = {'blue': blue, -- cgit 1.2.3-korg