[blivet:master 10/14] Get rid of writeRandomUUID.

mulhern amulhern at redhat.com
Fri Mar 28 22:50:35 UTC 2014


It is not used anywhere and pylint complains about all the subclasses
of FS in which it is not overridden.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/formats/fs.py | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 8c1163e..b888b36 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -688,9 +688,6 @@ class FS(DeviceFormat):
         uuid = util.capture_output(["uuidgen"]).strip()
         return uuid
 
-    def writeRandomUUID(self):
-        raise NotImplementedError("FS does not implement writeRandomUUID")
-
     @property
     def needsFSCheck(self):
         return False
@@ -918,22 +915,6 @@ class Ext2FS(FS):
 
         return msg.strip()
 
-    def writeRandomUUID(self):
-        if not self.exists:
-            raise FSError("filesystem does not exist")
-
-        err = None
-        try:
-            rc = util.run_program(["tune2fs", "-U", "random", self.device])
-        except OSError as e:
-            err = str(e)
-        else:
-            if rc:
-                err = rc
-
-        if err:
-            raise FSError("failed to set UUID for %s: %s" % (self.device, err))
-
     def _getMinSize(self, info=None):
         """ Set the minimum size for this filesystem in MiB.
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list