[master 17/30] Add a little utility method for constructing task objects.

mulkieran installerbot-noreply at redhat.com
Wed Mar 25 22:47:55 UTC 2015


From: mulhern <amulhern at redhat.com>

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

diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index 65acf6f..40fba02 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -87,6 +87,11 @@ def __init__(self, **kwargs):
                 that you can specify the device at the last moment by specifying
                 it via the 'device' kwarg to the :meth:`create` method.
         """
+
+        def getTaskObject(klass):
+            # pylint: disable=not-callable
+            return klass(self) if klass is not None else None
+
         if self.__class__ is FS:
             raise TypeError("FS is an abstract class.")
 


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/8d5714512a4172f9d11c0243dc4b054681dbe1f3


More information about the anaconda-patches mailing list