stage3: Fetcher.fetch_stage: Pass stderr fd to wget
The main entry point of the `mkvm` program closes FD 3 (native stderr) to prevent extraneous messages from libvirt. Unfortunately, this breaks wget's progress indicator, as it is printed to stderr as well. To ensure that the progress indicator works, we have to pass the FD of the copy of stderr to wget.master
parent
6dbc137b3a
commit
e28238dc33
|
@ -6,6 +6,7 @@ import io
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
import urllib.parse
|
||||
import urllib.request
|
||||
|
@ -102,7 +103,7 @@ class Fetcher(object):
|
|||
cmd += uris
|
||||
log.debug('Running command: {}'.format(' '.join(cmd)))
|
||||
try:
|
||||
p = subprocess.Popen(cmd, cwd=self.cache_dir)
|
||||
p = subprocess.Popen(cmd, cwd=self.cache_dir, stderr=sys.stderr)
|
||||
except OSError as e:
|
||||
raise FetchError('Failed to run wget: {}'.format(e))
|
||||
if p.wait() != 0:
|
||||
|
|
Loading…
Reference in New Issue