From 8be43de7d790e43f608e0b918863da83731e738e Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 31 Mar 2016 23:33:14 +0300 Subject: make the stl console to work at client package/from stl directory itself --- scripts/automation/trex_control_plane/stl/console/stl_path.py | 7 +++++++ .../automation/trex_control_plane/stl/console/trex_console.py | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 scripts/automation/trex_control_plane/stl/console/stl_path.py (limited to 'scripts') diff --git a/scripts/automation/trex_control_plane/stl/console/stl_path.py b/scripts/automation/trex_control_plane/stl/console/stl_path.py new file mode 100644 index 00000000..f15c666e --- /dev/null +++ b/scripts/automation/trex_control_plane/stl/console/stl_path.py @@ -0,0 +1,7 @@ +import sys, os + +# FIXME to the write path for trex_stl_lib +sys.path.insert(0, "../") + +STL_PROFILES_PATH = os.path.join(os.pardir, 'profiles') + diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index 8c71065c..da4c4486 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -30,14 +30,20 @@ import os import sys import tty, termios +try: + import stl_path +except: + from . import stl_path from trex_stl_lib.api import * from trex_stl_lib.utils.text_opts import * from trex_stl_lib.utils.common import user_input, get_current_user from trex_stl_lib.utils import parsing_opts - -from . import trex_tui +try: + import trex_tui +except: + from . import trex_tui from functools import wraps -- cgit 1.2.3-korg