Make finalize() accept a parameter once again since older versions of portage import...
authorZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 21:19:19 +0000 (21:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 30 Jul 2007 21:19:19 +0000 (21:19 -0000)
svn path=/main/trunk/; revision=7522

pym/portage/elog/mod_echo.py
pym/portage/elog/mod_mail_summary.py

index 9ae6fcf6c4e4c390948e83c89833bb888b2d2cf5..e9bd4bd381bd438fdf7a64bde0fd3bcdb82f06f9 100644 (file)
@@ -11,7 +11,10 @@ def process(mysettings, key, logentries, fulltext):
        global _items
        _items.append((mysettings, key, logentries))
 
-def finalize():
+def finalize(mysettings=None):
+       """The mysettings parameter is just for backward compatibility since
+       an older version of portage will import the module from a newer version
+       when it upgrades itself."""
        global _items
        printer = EOutput()
        for mysettings, key, logentries in _items:
index 884df40c839e83927067a61aba10ccb0df9474cd..7410f05af326e63e4e2fb458336e2c6240b300cd 100644 (file)
@@ -15,7 +15,10 @@ def process(mysettings, key, logentries, fulltext):
        mysettings, items = _items.setdefault(config_root, (mysettings, {}))
        items[key] = header + fulltext
 
-def finalize():
+def finalize(mysettings=None):
+       """The mysettings parameter is just for backward compatibility since
+       an older version of portage will import the module from a newer version
+       when it upgrades itself."""
        global _items
        for mysettings, items in _items.itervalues():
                _finalize(mysettings, items)