diff options
author | 2016-04-19 03:19:28 +0300 | |
---|---|---|
committer | 2016-04-19 03:19:28 +0300 | |
commit | 6840551a8733fefdd8b3f235e4a802524ecc39d9 (patch) | |
tree | 2208741daedb73a0e630cdd284091dd3b5c76633 /scripts/automation/trex_control_plane/stl/trex_stl_lib/utils | |
parent | 6c46ecabec713485954dc7394e8a9808309fb4bc (diff) | |
parent | e6d1ca8bc126b2efc5a15268cd2d9926f1be3ab9 (diff) |
Merge remote-tracking branch 'origin/master'
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_opts.py | 13 |
1 files changed, 3 insertions, 10 deletions
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, |