[master 1/1] Improve clarity of error when setting new default fstype fails.
dwlehman
installerbot-noreply at redhat.com
Fri Nov 6 19:10:00 UTC 2015
From: David Lehman <dlehman at redhat.com>
It's good to log the full format we instantiated, but we should be
inlcuding the type -- not a DeviceFormat instance -- in the error
message.
---
blivet/blivet.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/blivet/blivet.py b/blivet/blivet.py
index 53e95dd..464057b 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -1516,7 +1516,7 @@ def _check_valid_fstype(self, newtype):
if (not fmt.mountable or not fmt.formattable or not fmt.supported or
not fmt.linux_native):
log.debug("invalid default fstype: %r", fmt)
- raise ValueError("new value %s is not valid as a default fs type" % fmt)
+ raise ValueError("new value %s is not valid as a default fs type" % newtype)
self._default_fstype = newtype # pylint: disable=attribute-defined-outside-init
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/1316be166005b66c1a40daaf63834f0af7c9e9ed
More information about the anaconda-patches
mailing list