From: Zac Medico Date: Mon, 30 Jul 2007 21:19:19 +0000 (-0000) Subject: Make finalize() accept a parameter once again since older versions of portage import... X-Git-Tag: v2.2_pre1~918 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0cc7d78dcd29bb76fa415bf7047e3c9a8e01bce2;p=portage.git Make finalize() accept a parameter once again since older versions of portage import elog modules from newer versions of portage when they upgrade themselves. svn path=/main/trunk/; revision=7522 --- diff --git a/pym/portage/elog/mod_echo.py b/pym/portage/elog/mod_echo.py index 9ae6fcf6c..e9bd4bd38 100644 --- a/pym/portage/elog/mod_echo.py +++ b/pym/portage/elog/mod_echo.py @@ -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: diff --git a/pym/portage/elog/mod_mail_summary.py b/pym/portage/elog/mod_mail_summary.py index 884df40c8..7410f05af 100644 --- a/pym/portage/elog/mod_mail_summary.py +++ b/pym/portage/elog/mod_mail_summary.py @@ -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)