mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 01:03:09 +00:00
Use BUFSIZE when putting file as well as fetching file.
This commit is contained in:
@@ -121,7 +121,7 @@ class Connection(object):
|
||||
try:
|
||||
with open(in_path, 'rb') as in_file:
|
||||
try:
|
||||
p = self._buffered_exec_command('dd of=%s' % out_path, None, stdin=in_file)
|
||||
p = self._buffered_exec_command('dd of=%s bs=%s' % (out_path, BUFSIZE), None, stdin=in_file)
|
||||
except OSError:
|
||||
raise errors.AnsibleError("chroot connection requires dd command in the chroot")
|
||||
try:
|
||||
|
||||
@@ -143,7 +143,7 @@ class Connection(object):
|
||||
try:
|
||||
with open(in_path, 'rb') as in_file:
|
||||
try:
|
||||
p = self._buffered_exec_command('dd of=%s' % out_path, None, stdin=in_file)
|
||||
p = self._buffered_exec_command('dd of=%s bs=%s' % (out_path, BUFSIZE), None, stdin=in_file)
|
||||
except OSError:
|
||||
raise errors.AnsibleError("jail connection requires dd command in the jail")
|
||||
try:
|
||||
|
||||
@@ -156,7 +156,7 @@ class Connection(object):
|
||||
try:
|
||||
with open(in_path, 'rb') as in_file:
|
||||
try:
|
||||
p = self._buffered_exec_command('dd of=%s' % out_path, None, stdin=in_file)
|
||||
p = self._buffered_exec_command('dd of=%s bs=%s' % (out_path, BUFSIZE), None, stdin=in_file)
|
||||
except OSError:
|
||||
raise errors.AnsibleError("jail connection requires dd command in the jail")
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user