summaryrefslogtreecommitdiffstats
path: root/vswitches/ovs_vanilla.py
diff options
context:
space:
mode:
Diffstat (limited to 'vswitches/ovs_vanilla.py')
-rw-r--r--vswitches/ovs_vanilla.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index 942ddd41..83c52050 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -75,10 +75,8 @@ class OvsVanilla(IVSwitchOvs):
See IVswitch for general description
"""
if self._current_id == len(self._ports):
- self._logger.error("Can't add port! There are only " +
- len(self._ports) + " ports " +
- "defined in config!")
- raise RuntimeError('Failed to add phy port')
+ raise RuntimeError("Can't add phy port! There are only {} ports defined "
+ "by WHITELIST_NICS parameter!".format(len(self._ports)))
if not self._ports[self._current_id]:
self._logger.error("Can't detect device name for NIC %s", self._current_id)
raise ValueError("Invalid device name for %s" % self._current_id)