[Kimchi-devel] [PATCH 1/5] Add message to KCHNET0010E code

Aline Manera alinefm at linux.vnet.ibm.com
Wed Jan 7 19:04:45 UTC 2015


Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 src/kimchi/i18n.py           | 3 ++-
 src/kimchi/model/networks.py | 6 ++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index e3a051c..adbd071 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -1,7 +1,7 @@
 #
 # Project Kimchi
 #
-# Copyright IBM, Corp. 2014
+# Copyright IBM, Corp. 2014-2015
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -223,6 +223,7 @@ messages = {
     "KCHNET0007E": _("Interface should be bare NIC, bonding or bridge device."),
     "KCHNET0008E": _("Unable to create network %(name)s. Details: %(err)s"),
     "KCHNET0009E": _("Unable to find a free IP address for network '%(name)s'"),
+    "KCHNET0010E": _("The interface %(iface)s already exist."),
     "KCHNET0011E": _("Network name must be a string"),
     "KCHNET0012E": _("Supported network types are isolated, NAT and bridge"),
     "KCHNET0013E": _("Network subnet must be a string with IP address and prefix or netmask"),
diff --git a/src/kimchi/model/networks.py b/src/kimchi/model/networks.py
index 1e94fd2..7a52a19 100644
--- a/src/kimchi/model/networks.py
+++ b/src/kimchi/model/networks.py
@@ -1,7 +1,7 @@
 #
 # Project Kimchi
 #
-# Copyright IBM, Corp. 2014
+# Copyright IBM, Corp. 2014-2015
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -211,9 +211,7 @@ class NetworksModel(object):
         conn = self.conn.get()
 
         if br_name in [net.bridgeName() for net in conn.listAllNetworks()]:
-            error_msg = 'The interface %s already exist' % br_name
-            raise InvalidOperation("KCHNET0010E", {'iface': br_name,
-                                                   'err': error_msg})
+            raise InvalidOperation("KCHNET0010E", {'iface': br_name})
 
         with RollbackContext() as rollback:
             try:
-- 
2.1.0




More information about the Kimchi-devel mailing list