From e6a8d36f7bec7be8e89106d1281e0f863cf7529e Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Wed, 14 Apr 2021 15:14:21 -0300 Subject: [PATCH] 17522: Fixes bug, corrects updated test's assertion. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- sdk/python/arvados/commands/put.py | 2 +- sdk/python/tests/test_arv_put.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py index 5a01a43df4..9596a2dc2d 100644 --- a/sdk/python/arvados/commands/put.py +++ b/sdk/python/arvados/commands/put.py @@ -742,7 +742,7 @@ class ArvPutUploadJob(object): def _write_stdin(self, filename): output = self._local_collection.open(filename, 'wb') - self._write(sys.stdin, output) + self._write(sys.stdin.buffer, output) output.close() def _check_file(self, source, filename): diff --git a/sdk/python/tests/test_arv_put.py b/sdk/python/tests/test_arv_put.py index 6b670e512c..e75d39d879 100644 --- a/sdk/python/tests/test_arv_put.py +++ b/sdk/python/tests/test_arv_put.py @@ -924,7 +924,7 @@ class ArvPutIntegrationTest(run_test_server.TestCaseWithServers, elif returncode != 0: sys.stdout.write(pipe.stdout.read()) self.fail("arv-put returned exit code {}".format(returncode)) - self.assertIn('4a9c8b735dce4b5fa3acf221a0b13628+11', + self.assertIn('1cb671b355a0c23d5d1c61d59cdb1b2b+12', pipe.stdout.read().decode()) def test_sigint_logs_request_id(self): -- 2.39.5