]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks/rbd: update NamedTemporaryFile usage for python3
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Apr 2020 21:22:17 +0000 (23:22 +0200)
committerKefu Chai <kchai@redhat.com>
Sun, 14 Jun 2020 08:34:51 +0000 (16:34 +0800)
commitf2169152834ceb6cc4dfb478f71008479e6e9728
tree9e55370c5c025881e4cf19f1f13f8269369bba94
parentbb8f7b0907a2557f4ef5b0455c0fce66aa896e4b
qa/tasks/rbd: update NamedTemporaryFile usage for python3

- open the file in text mode to avoid 'bytes' objects

- 'bufsize' is now spelled 'buffering' and switching buffering off
  with 'buffering=0' is only allowed in binary mode.  As we need the
  file to be either in the page cache or on disk before we copy it
  to the remote, call flush().

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit aba9910388cce7c03aa90726b5de1263298ac8ec)
qa/tasks/rbd.py