summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-18 00:34:42 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-18 00:34:42 +0000
commita50232026ffc53a3b162ebf39849ede37b6be5d8 (patch)
tree9ddbc4a8649a8e9f24cf578382ea9b7fdba4ae12
parenta7ffe0d77f263b592f470dba6dac86aaa0d6b423 (diff)
downloadportage-a50232026ffc53a3b162ebf39849ede37b6be5d8.tar.gz
portage-a50232026ffc53a3b162ebf39849ede37b6be5d8.tar.bz2
portage-a50232026ffc53a3b162ebf39849ede37b6be5d8.zip
Use dblink._eerror() to eliminate duplicate code.
svn path=/main/trunk/; revision=11119
-rw-r--r--pym/portage/dbapi/vartree.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index a52946942..b6b2dbf1a 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -1715,13 +1715,7 @@ class dblink(object):
"phases to be skipped entirely."
msg_lines.extend(wrap(msg, 72))
- from portage.elog.messages import eerror
- if scheduler is None:
- for l in msg_lines:
- eerror(l, phase=ebuild_phase, key=self.mycpv)
- else:
- scheduler.dblinkElog(self,
- ebuild_phase, eerror, msg_lines)
+ self._eerror(ebuild_phase, msg_lines)
# process logs created during pre/postrm
elog_process(self.mycpv, self.settings, phasefilter=filter_unmergephases)
@@ -2432,14 +2426,8 @@ class dblink(object):
if slot is None:
slot = ""
- from portage.elog.messages import eerror as _eerror
def eerror(lines):
- if scheduler is None:
- for l in lines:
- _eerror(l, phase="preinst", key=self.settings.mycpv)
- else:
- scheduler.dblinkElog(self,
- "preinst", _eerror, lines)
+ self._eerror("preinst", lines)
if slot != self.settings["SLOT"]:
showMessage("!!! WARNING: Expected SLOT='%s', got '%s'\n" % \