For bug #187375, handle an ImportError when portage is downgraded to a version withou...
authorZac Medico <zmedico@gentoo.org>
Wed, 1 Aug 2007 18:00:47 +0000 (18:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 1 Aug 2007 18:00:47 +0000 (18:00 -0000)
svn path=/main/trunk/; revision=7535

pym/emerge/__init__.py

index 74d83220cdd4c43a5a96c0ffa57f21ffb9198403..8b0f8a59e016c1c3cded3674ebb91913d66fe301 100644 (file)
@@ -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)