[PATCH 08/10] Fix default definitions of some payload class methods.

Chris Lumens clumens at redhat.com
Tue Aug 28 18:54:03 UTC 2012


Various parts of anaconda either call these methods or expect them to return
certain values (so, not NotImplementedError) and it's just easier to have them
return default values than create new implementations.
---
 pyanaconda/packaging/__init__.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index dcfc027..d7c2134 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -145,6 +145,12 @@ class Payload(object):
         """ Do any payload-specific setup. """
         raise NotImplementedError()
 
+    def preStorage(self):
+        """ Do any payload-specific work necessary before writing the storage
+            configuration.  This method need not be provided by all payloads.
+        """
+        pass
+
     def release(self):
         """ Release any resources in use by this object, but do not do final
             cleanup.  This is useful for dealing with payload backends that do
@@ -275,7 +281,7 @@ class Payload(object):
         raise NotImplementedError()
 
     def languageGroups(self, lang):
-        raise NotImplementedError()
+        return []
 
     def groupDescription(self, groupid):
         raise NotImplementedError()
-- 
1.7.11.2



More information about the anaconda-patches mailing list