]> 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>
Wed, 3 Jun 2020 11:57:00 +0000 (19:57 +0800)
commit3dc63cabbf80d2aadb5801d89e134e2887a2c830
treeaf678571a5612b88e7332d90c0d4d94c600134a4
parentfc1fe3268a13de78f10cdbeebcca956f81978470
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