[unpackfs] Reading from the pipe is line-oriented

- Using bufsize=1 causes warnings, since we never bothered
  to explicitly set text mode.
This commit is contained in:
Adriaan de Groot 2020-02-20 21:40:33 +01:00
parent 7c7af28a0d
commit 327c1c0e7b

View File

@ -132,7 +132,8 @@ def file_copy(source, entry, progress_cb):
args.extend(["--exclude", f])
args.extend(['--progress', source, dest])
process = subprocess.Popen(
args, env=at_env, bufsize=1, stdout=subprocess.PIPE, close_fds=ON_POSIX
args, env=at_env, universal_newlines=True, bufsize=1,
stdout=subprocess.PIPE, close_fds=ON_POSIX
)
# last_num_files_copied trails num_files_copied, and whenever at least 100 more
# files have been copied, progress is reported and last_num_files_copied is updated.