From a2ab781647a252bb2aac5e9323ca95c2a0e2edb1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 1 Oct 2007 19:44:39 +0000 Subject: [PATCH] Bug #194398 - Do not log "exiting successfully" in emerge.log unless the status really is successful. Otherwise, log "exiting unsuccessfully". Thanks to David Watzke. svn path=/main/trunk/; revision=7900 --- pym/emerge/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index e396e8ad0..7c00cdf74 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -4491,8 +4491,11 @@ def post_emerge(trees, mtimedb, retval): os.chdir("/") - emergelog("notitles" not in settings.features, - " *** exiting successfully.") + if retval == os.EX_OK: + exit_msg = " *** exiting successfully." + else: + exit_msg = " *** exiting unsuccessfully with status '%s'." % retval + emergelog("notitles" not in settings.features, exit_msg) # Dump the mod_echo output now so that our other notifications are shown # last. -- 2.26.2