Don't append yum output to the diff file

This commit is contained in:
Martin Gracik 2010-12-03 09:53:21 +01:00
parent acbbfa3381
commit 5e3d5b45a3
1 changed files with 13 additions and 0 deletions

View File

@ -72,9 +72,22 @@ def main(args):
sys.stdout.write(line)
# set up yum
# XXX HACK
# we don't want yum's stuff in the output
# so we redirect stdout to /dev/null for a while...
stdout = os.dup(1)
null = open("/dev/null", "w")
os.dup2(null.fileno(), 1)
# here yum prints out some stuff we really don't care about
yb = yum.YumBase()
yb.doSackSetup()
# give the stdout back
os.dup2(stdout, 1)
null.close()
# get excessive files in source
sys.stderr.write("getting excessive files in source\n")
sizedict, pkgdict = {}, {}