Create config script: fix verify custom MAC in interactive mode 51/5351/1
authorYaroslav Brustinov <[email protected]>
Tue, 3 Jan 2017 22:59:07 +0000 (00:59 +0200)
committerYaroslav Brustinov <[email protected]>
Tue, 3 Jan 2017 22:59:07 +0000 (00:59 +0200)
Change-Id: I503cea766e840682c1698cc2201bc24ef1c287d6
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/dpdk_setup_ports.py

index 97484f2..b2c9eb0 100755 (executable)
@@ -3,7 +3,9 @@
 import sys
 import os
 python_ver = 'python%s' % sys.version_info[0]
-sys.path.append(os.path.join('external_libs', 'pyyaml-3.11', python_ver))
+yaml_path = os.path.join('external_libs', 'pyyaml-3.11', python_ver)
+if yaml_path not in sys.path:
+    sys.path.append(yaml_path)
 import yaml
 import dpdk_nic_bind
 import re
@@ -831,7 +833,7 @@ Other network devices
                         input_mac = dpdk_nic_bind.read_line('Please enter new destination MAC of interface %s: ' % interface['Interface_argv'])
                         try:
                             if input_mac:
-                                ConfigCreator._convert_mac(input_mac) # verify format
+                                ConfigCreator.verify_mac(input_mac) # verify format
                                 dest_mac = input_mac
                                 loopback_dest = False
                             else: