[PATCH 8/8] Handle mountopts being empty.

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

 



We want to do the check for empty twice, since removing "defaults" and
"defaults," may make the original mountopts empty.
---
 storage/__init__.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index cba5d09..11e2e7b 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1111,8 +1111,10 @@ class FSSet(object):
                 continue
             if device.format.mountpoint:
                 options = device.format.mountopts
-                options = options.replace("defaults,", "")
-                options = options.replace("defaults", "")
+                if options:
+                    options = options.replace("defaults,", "")
+                    options = options.replace("defaults", "")
+
                 if options:
                     options = "rw," + options
                 else:
-- 
1.6.1.3

_______________________________________________
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