summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-01-10 19:13:57 +0000
committerZac Medico <zmedico@gentoo.org>2009-01-10 19:13:57 +0000
commit1e5aa2c56e9fc9b6c83627e963d52458a5cbb1c4 (patch)
tree631a38be56f0f28427d9b39af3b9132db812c09b
parentUse ebegin/eend to indicate when waiting for a lock and when it's acquired. (diff)
downloadportage-multirepo-1e5aa2c56e9fc9b6c83627e963d52458a5cbb1c4.tar.gz
portage-multirepo-1e5aa2c56e9fc9b6c83627e963d52458a5cbb1c4.tar.bz2
portage-multirepo-1e5aa2c56e9fc9b6c83627e963d52458a5cbb1c4.zip
Add a "quiet" parameter to the EOutput constructor, and also flush
stderr/stdout stream in the constructor. svn path=/main/trunk/; revision=12416
-rw-r--r--pym/portage/output.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/output.py b/pym/portage/output.py
index f833e8f5..1f0eec98 100644
--- a/pym/portage/output.py
+++ b/pym/portage/output.py
@@ -437,10 +437,10 @@ class EOutput(object):
@type term_columns: IntType
"""
- def __init__(self):
+ def __init__(self, quiet=False):
self.__last_e_cmd = ""
self.__last_e_len = 0
- self.quiet = False
+ self.quiet = quiet
lines, columns = get_term_size()
if columns <= 0:
columns = 80
@@ -448,6 +448,8 @@ class EOutput(object):
if os.environ.get("TERM") in ("cons25", "dumb"):
columns = columns - 1
self.term_columns = columns
+ sys.stdout.flush()
+ sys.stderr.flush()
def __eend(self, caller, errno, msg):
if errno == 0: