[PATCH] clearer error messages for missing iscsi initiator name

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

 



We show the ValueException string to the user when he enter something
wrong, as the user enters multiple fields in one go mention which
value is wrong in the error message. Also make the error messages
translatable as they are shown to the user.

Related: rhbz#594434
---
 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)
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux