From 518e0db526e6a01f1b4488a0382aad6c0f988461 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 30 Jul 2007 21:24:15 +0000 Subject: [PATCH] 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 --- pym/elog_modules/mod_echo.py | 5 ++++- pym/elog_modules/mod_mail_summary.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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) -- 2.26.2