[master 17/30] Add a little utility method for constructing task objects.
mulkieran
installerbot-noreply at redhat.com
Fri Apr 10 19:49:45 UTC 2015
From: mulhern <amulhern at redhat.com>
Related: #12
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 f7d9bd7..fb7ea1f 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/be768b2a721414030067bb13c0079e7244d94d2d
More information about the anaconda-patches
mailing list