From 40d28262cb91224702a1ea6dcf882e3637b96f4e Mon Sep 17 00:00:00 2001 From: mupton Date: Mon, 26 Oct 2020 14:58:22 -0700 Subject: [PATCH] tests: fix dezip of ubuntu images in long regr needed to change output open from 'w' to 'wb' to write binary format Change-Id: Ia176d86a8ab8cc083ffc9508e051b667936eca2c Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36615 Reviewed-by: Jason Lowe-Power Reviewed-by: Bobby R. Bruce Maintainer: Jason Lowe-Power Maintainer: Bobby R. Bruce Tested-by: kokoro --- tests/gem5/fixture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py index e8a67b803..467eb4303 100644 --- a/tests/gem5/fixture.py +++ b/tests/gem5/fixture.py @@ -297,7 +297,7 @@ class DownloadedProgram(UniqueFixture): gzipped_filename = self.filename + ".gz" urllib.request.urlretrieve(self.url, gzipped_filename) - with open(self.filename, 'w') as outfile: + with open(self.filename, 'wb') as outfile: with gzip.open(gzipped_filename, 'r') as infile: shutil.copyfileobj(infile, outfile) -- 2.30.2