diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-07-20 18:38:20 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-07-20 18:38:20 -0700 |
commit | ff84a3ce55e7f893b6686a1f7f027f7628238097 (patch) | |
tree | 8392f5ceb6153e92e778b4ea377ac5dc29d99652 | |
parent | 1a4f95f93b5f370a39f8d7efab4cad8be635b7f6 (diff) | |
download | portage-ff84a3ce55e7f893b6686a1f7f027f7628238097.tar.gz portage-ff84a3ce55e7f893b6686a1f7f027f7628238097.tar.bz2 portage-ff84a3ce55e7f893b6686a1f7f027f7628238097.zip |
Move the mod_echo import to the top, so the module is pre-loaded.
-rw-r--r-- | pym/_emerge/_flush_elog_mod_echo.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/pym/_emerge/_flush_elog_mod_echo.py b/pym/_emerge/_flush_elog_mod_echo.py index 4b24aad59..eab416880 100644 --- a/pym/_emerge/_flush_elog_mod_echo.py +++ b/pym/_emerge/_flush_elog_mod_echo.py @@ -1,6 +1,8 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from portage.elog import mod_echo + def _flush_elog_mod_echo(): """ Dump the mod_echo output now so that our other @@ -8,13 +10,6 @@ def _flush_elog_mod_echo(): @rtype: bool @returns: True if messages were shown, False otherwise. """ - messages_shown = False - try: - from portage.elog import mod_echo - except ImportError: - pass # happens during downgrade to a version without the module - else: - messages_shown = bool(mod_echo._items) - mod_echo.finalize() + messages_shown = bool(mod_echo._items) + mod_echo.finalize() return messages_shown - |