[blivet:master 14/21] Remove _getExistingSize() methods with body pass.

mulhern amulhern at redhat.com
Thu Jan 15 18:39:41 UTC 2015


pass is equivalent to "return None" and we have a long-standing objection
to assigning None to fields that refer to Size objects.

For both classes, the effect of
self._size = self._getExistingSize()

is now

self._size = self._size, i.e., a null op

instead of

self._size = None

assuming self._size is some Size before the op.

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

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 4474a61..a83e093 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1495,9 +1495,6 @@ class NoDevFS(FS):
     def mountType(self):
         return self.device  # this is probably set to the real/specific fstype
 
-    def _getExistingSize(self, info=None):
-        pass
-
 register_device_format(NoDevFS)
 
 
@@ -1655,9 +1652,6 @@ class BindFS(FS):
     def mountable(self):
         return True
 
-    def _getExistingSize(self, info=None):
-        pass
-
 register_device_format(BindFS)
 
 
-- 
1.9.3



More information about the anaconda-patches mailing list