From 859edb10cda6ca4e28ecf9f449ced057a25db392 Mon Sep 17 00:00:00 2001 From: Ryan Gonzalez Date: Tue, 17 May 2022 17:45:25 -0500 Subject: [PATCH] Fix S3 tests on Python 3 read_path() can read in binary, which the S3 tests don't support (simply because they don't need it)...but it needs to be able to take the `mode` argument anyway. Signed-off-by: Ryan Gonzalez --- system/s3_lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/s3_lib.py b/system/s3_lib.py index 9940fe13..e2c70043 100644 --- a/system/s3_lib.py +++ b/system/s3_lib.py @@ -76,7 +76,10 @@ class S3Test(BaseTest): if self.check_path(path): raise Exception("path %s exists" % (path, )) - def read_file(self, path): + def read_file(self, path, mode=''): + # We don't support reading as binary here. + assert not mode + if path.startswith("public/"): path = path[7:]