summaryrefslogtreecommitdiffstats
path: root/scripts/trex-console
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/trex-console')
-rwxr-xr-xscripts/trex-console28
1 files changed, 1 insertions, 27 deletions
diff --git a/scripts/trex-console b/scripts/trex-console
index 9e01dd16..53dbb0c1 100755
--- a/scripts/trex-console
+++ b/scripts/trex-console
@@ -1,31 +1,5 @@
#!/bin/bash
-# if no variable of $PYTHON is define - we try to find it
-function find_python {
- # two candidates - machine python and cisco linux python
- MACHINE_PYTHON=python
- CEL_PYTHON=/router/bin/python
-
- # try the machine python
- PYTHON=$MACHINE_PYTHON
-
- PCHECK=`$PYTHON -c "import sys; ver = sys.version_info[0] * 10 + sys.version_info[1];sys.exit(ver < 27)"`
- if [ $? -ne 0 ]; then
- PYTHON=$CEL_PYTHON
- PCHECK=`$PYTHON -c "import sys; ver = sys.version_info[0] * 10 + sys.version_info[1];sys.exit(ver < 27)"`
-
- if [ $? -ne 0 ]; then
- echo "*** $PYTHON - python version is too old, 2.7 at least is required"
- exit -1
- fi
-
- fi
-
-}
-
-if [ -z "$PYTHON" ]; then
- find_python
-fi
-
+source find_python.sh
$PYTHON automation/trex_control_plane/console/trex_console.py $@