]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-crash: use open(..,'rb') to read bytes for Python3
authorDan Mick <dan.mick@redhat.com>
Mon, 15 Jul 2019 21:39:52 +0000 (14:39 -0700)
committerDan Mick <dan.mick@redhat.com>
Mon, 15 Jul 2019 21:39:52 +0000 (14:39 -0700)
Fixes: http://tracker.ceph.com/issues/40781
Signed-off-by: Dan Mick <dan.mick@redhat.com>
src/ceph-crash.in

index 5bfb50c474b87050e5b314e396811bda2e242e50..f0d24dec644646b2f2bfe678e6ff97d7188c8eab 100755 (executable)
@@ -32,7 +32,7 @@ def post_crash(path):
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE,
     )
-    f = open(os.path.join(path, 'meta'), 'r')
+    f = open(os.path.join(path, 'meta'), 'rb')
     stdout, stderr = pr.communicate(input=f.read())
     rc = pr.wait()
     f.close()