[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] clearer error messages for missing iscsi initiator name



Hi,

On 05/21/2010 05:09 PM, Chris Lumens wrote:
  storage/iscsi.py |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/iscsi.py b/storage/iscsi.py
index 48ccb42..d7a31e7 100644
--- a/storage/iscsi.py
+++ b/storage/iscsi.py
@@ -132,9 +132,9 @@ class iscsi(object):

      def _setInitiator(self, val):
          if self.initiatorSet and val != self._initiator:
-            raise ValueError, "Unable to change iSCSI initiator name once set"
+            raise ValueError, _("Unable to change iSCSI initiator name once set")
          if len(val) == 0:
-            raise ValueError, "Must provide a non-zero length string"
+            raise ValueError, _("Must provide an iSCSI initiator name")
          self._initiator = val

      initiator = property(_getInitiator, _setInitiator)

Do these messages get displayed in a UI

Yes these exception mesg get shown to the user as the mesg why adding an
iscsi disk failed.

Regards,

Hans


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]