From 1d6e6b2fe3b0107153b76dfe84ef8b2dc8240658 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 27 Mar 2011 15:37:47 -0700 Subject: [PATCH] display_merge: tweak background/logging logic --- pym/portage/dbapi/vartree.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index e9b183ec9..08263d6d3 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1731,11 +1731,13 @@ class dblink(object): if self._scheduler is None: writemsg_level(msg, level=level, noiselevel=noiselevel) else: - log_path = self.settings.get("PORTAGE_LOG_FILE") + log_path = None + if self.settings.get("PORTAGE_BACKGROUND") != "subprocess": + log_path = self.settings.get("PORTAGE_LOG_FILE") background = self.settings.get("PORTAGE_BACKGROUND") == "1" - if log_path is None: - if not (background and level < logging.WARN): + if background and log_path is None: + if level >= logging.WARN: writemsg_level(msg, level=level, noiselevel=noiselevel) else: self._scheduler.output(msg, -- 2.26.2