set domute instead of checking etpUi['mute'] twice, this avoids multithreading issues

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1359 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2008-03-02 12:53:57 +00:00
parent 3b06a3373e
commit 80d7def7ab
+3 -1
View File
@@ -797,7 +797,9 @@ def portage_doebuild(myebuild, mydo, tree, cpv, portage_tmpdir = None, licenses
### SETUP ENVIRONMENT
# if mute, supress portage output
domute = False
if etpUi['mute']:
domute = True
oldsysstdout = sys.stdout
sys.stdout = f
@@ -866,7 +868,7 @@ def portage_doebuild(myebuild, mydo, tree, cpv, portage_tmpdir = None, licenses
rc = portage.doebuild(myebuild = str(myebuild), mydo = str(mydo), myroot = mypath, tree = tree, mysettings = mysettings, mydbapi = mydbapi, vartree = vartree, use_cache = 0)
# if mute, restore old stdout/stderr
if etpUi['mute']:
if domute:
sys.stdout = oldsysstdout
sys.stderr = oldsystderr