commit: 3572449357927d40e43c937bc35e26d78eb3b91a Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Fri Aug 2 15:57:39 2019 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Fri Aug 2 20:01:10 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=35724493
process: redirect IPv6 'ip' command output to /dev/null Bug: https://bugs.gentoo.org/691290 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> lib/portage/process.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/portage/process.py b/lib/portage/process.py index 77f7fac02..690421815 100644 --- a/lib/portage/process.py +++ b/lib/portage/process.py @@ -478,8 +478,10 @@ def _configure_loopback_interface(): try: subprocess.call(['ip', 'address', 'add', '10.0.0.1/8', 'dev', 'lo']) - subprocess.call(['ip', 'address', 'add', 'fd00::1/8', 'dev', 'lo']) - except OSError as e: + with open(os.devnull, 'wb', 0) as devnull: + subprocess.call(['ip', 'address', 'add', 'fd00::1/8', 'dev', 'lo'], + stdout=devnull, stderr=devnull) + except EnvironmentError as e: writemsg("Error calling 'ip': %s\n" % e.strerror, noiselevel=-1) def _exec(binary, mycommand, opt_name, fd_pipes,
