[blivet:master 09/15] Make formats.teardown() not take any extra parameters.

mulhern amulhern at redhat.com
Wed May 7 23:05:53 UTC 2014


They are not used and it is never called with any arguments.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 blivet/formats/__init__.py | 2 +-
 blivet/formats/fs.py       | 4 ++--
 blivet/formats/luks.py     | 2 +-
 blivet/formats/swap.py     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/blivet/formats/__init__.py b/blivet/formats/__init__.py
index ddaee09..6f5b54d 100644
--- a/blivet/formats/__init__.py
+++ b/blivet/formats/__init__.py
@@ -444,7 +444,7 @@ class DeviceFormat(ObjectID):
         if not self.device or not os.path.exists(self.device):
             raise FormatSetupError("invalid device specification")
 
-    def teardown(self, *args, **kwargs):
+    def teardown(self):
         """ Deactivate the formatting. """
         log_method_call(self, device=self.device,
                         type=self.type, status=self.status)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index e4961c8..5c71caf 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -831,8 +831,8 @@ class FS(DeviceFormat):
         """
         return self.mount(**kwargs)
 
-    def teardown(self, *args, **kwargs):
-        return self.unmount(*args, **kwargs)
+    def teardown(self):
+        return self.unmount()
 
     @property
     def status(self):
diff --git a/blivet/formats/luks.py b/blivet/formats/luks.py
index eeec5ab..ea90840 100644
--- a/blivet/formats/luks.py
+++ b/blivet/formats/luks.py
@@ -192,7 +192,7 @@ class LUKS(DeviceFormat):
                        passphrase=self.__passphrase,
                        key_file=self._key_file)
 
-    def teardown(self, *args, **kwargs):
+    def teardown(self):
         """ Close, or tear down, the format. """
         log_method_call(self, device=self.device,
                         type=self.type, status=self.status)
diff --git a/blivet/formats/swap.py b/blivet/formats/swap.py
index 5b1d0c5..749a227 100644
--- a/blivet/formats/swap.py
+++ b/blivet/formats/swap.py
@@ -163,7 +163,7 @@ class SwapSpace(DeviceFormat):
         DeviceFormat.setup(self, *args, **kwargs)
         swap.swapon(self.device, priority=self.priority)
 
-    def teardown(self, *args, **kwargs):
+    def teardown(self):
         """ Close, or tear down, a device. """
         log_method_call(self, device=self.device,
                         type=self.type, status=self.status)
-- 
1.8.3.1



More information about the anaconda-patches mailing list