From 14130d66fe82a147b52eaef1e410393be42d51dc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 1 Aug 2007 18:00:47 +0000 Subject: [PATCH] For bug #187375, handle an ImportError when portage is downgraded to a version without mod_echo. svn path=/main/trunk/; revision=7535 --- pym/emerge/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 74d83220c..8b0f8a59e 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4342,8 +4342,12 @@ def post_emerge(trees, mtimedb, retval): # Dump the mod_echo output now so that our other notifications are shown # last. - from portage.elog import mod_echo - mod_echo.finalize() + try: + from portage.elog import mod_echo + except ImportError: + pass # happens during downgrade to a version without the module + else: + mod_echo.finalize() if "noinfo" not in settings.features: chk_updated_info_files(target_root, infodirs, info_mtimes, retval) -- 2.26.2