From: Zac Medico Date: Mon, 30 Jul 2007 21:24:15 +0000 (-0000) Subject: Make finalize() accept a parameter once again since older versions of portage import... X-Git-Tag: v2.1.3.9~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=518e0db526e6a01f1b4488a0382aad6c0f988461;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. (trunk r7522) svn path=/main/branches/2.1.2/; revision=7523 --- diff --git a/pym/elog_modules/mod_echo.py b/pym/elog_modules/mod_echo.py index 6d2c95f4e..c3041ae81 100644 --- a/pym/elog_modules/mod_echo.py +++ b/pym/elog_modules/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/elog_modules/mod_mail_summary.py b/pym/elog_modules/mod_mail_summary.py index 22ec0ff0c..d42f6453e 100644 --- a/pym/elog_modules/mod_mail_summary.py +++ b/pym/elog_modules/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)