[rhinstaller/anaconda/pulls/33 f22-branch] master/f22-branch - Set the default fs label when reformatting (#1141981)
mulkieran
installerbot-noreply at redhat.com
Wed Mar 11 13:10:06 UTC 2015
And validate_label would need some work as well, something like:
```
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 42d0e63..510618c 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -125,21 +125,15 @@ def validate_label(label, fmt):
"""Returns a code indicating either that the given label can be set for
this filesystem or the reason why it cannot.
- In the case where the format cannot assign a label, the empty string
- stands for accept the default, but in the case where the format can
- assign a label the empty string represents itself.
-
- :param str label: The label
+ :param label: The label
+ :type label: str or NoneType
:param DeviceFormat fmt: The device format to label
"""
if fmt.exists:
return _("Cannot relabel already existing file system.")
- if not fmt.labeling():
- if label == "":
- return ""
- else:
- return _("Cannot set label on file system.")
+ if not fmt.labeling() and label:
+ return _("Cannot set label on file system.")
if not fmt.labelFormatOK(label):
return _("Unacceptable label format for file system.")
return ""
```
But it seems like a hopeful sign that all these changes would be simplifying changes, and they would only affect those three filesystems anyway.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/33
More information about the anaconda-patches
mailing list