summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-28 21:51:13 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-28 21:51:13 +0000
commit39c8ff5ddf72d0e9be0b0ed8338065e82f8e770e (patch)
treee9fb89a3082b3bbb69cdae71c5cf99d3d5c4aebf
parent25753857addede248f8dca39250c269776395330 (diff)
downloadportage-39c8ff5ddf72d0e9be0b0ed8338065e82f8e770e.tar.gz
portage-39c8ff5ddf72d0e9be0b0ed8338065e82f8e770e.tar.bz2
portage-39c8ff5ddf72d0e9be0b0ed8338065e82f8e770e.zip
Bug #193548 - When scanning for config updates and an error
occurs, send find's stdout to /dev/null so that only an error message is shown. svn path=/main/trunk/; revision=7875
-rw-r--r--pym/emerge/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 46732a084..e396e8ad0 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -4554,11 +4554,13 @@ def chk_updated_cfg_files(target_root, config_protect):
else:
mycommand = "find '%s' -maxdepth 1 -iname '._cfg????_%s'" % \
os.path.split(x.rstrip(os.path.sep))
- a = commands.getstatusoutput(mycommand + \
- " ! -iname '.*~' ! -iname '.*.bak' -print0")
+ mycommand += " ! -iname '.*~' ! -iname '.*.bak' -print0"
+ a = commands.getstatusoutput(mycommand)
if a[0] != 0:
- print >> sys.stderr, " " + bad("*")+ \
- " error scanning '%s': %s" % (x, a[1])
+ sys.stderr.write(" %s error scanning '%s': " % (bad("*"), x))
+ sys.stderr.flush()
+ # Show the error message alone, sending stdout to /dev/null.
+ os.system(mycommand + " 1>/dev/null")
else:
files = a[1].split('\0')
# split always produces an empty string as the last element