Skip to content

Commit

Permalink
Add a little utility method for constructing task objects.
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <amulhern@redhat.com>
  • Loading branch information
mulkieran committed Mar 25, 2015
1 parent 13aca52 commit 8d57145
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blivet/formats/fs.py
Expand Up @@ -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.")

Expand Down

0 comments on commit 8d57145

Please sign in to comment.