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

bin/emerge

index fb4fbe7e318d6adb6ed877768891d9c5ce2dea9c..790cd14fd6777c98d20b3cda3b9f6ec9746d6ae5 100755 (executable)
@@ -4342,8 +4342,12 @@ def post_emerge(settings, mtimedb, retval):
 
        # Dump the mod_echo output now so that our other notifications are shown
        # last.
-       from elog_modules import mod_echo
-       mod_echo.finalize()
+       try:
+               from elog_modules 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)