From e1a1854e3f30bed18467e6c0feb896338ad4419a Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Mar 2017 15:34:59 +0000 Subject: Bigstep: fix bug when executing in python3. Python 2's json.loads would accept bytes, so this bug was only exposed in python3. --- cloudinit/sources/DataSourceBigstep.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit/sources') diff --git a/cloudinit/sources/DataSourceBigstep.py b/cloudinit/sources/DataSourceBigstep.py index 5ffdcb25..d7fcd45a 100644 --- a/cloudinit/sources/DataSourceBigstep.py +++ b/cloudinit/sources/DataSourceBigstep.py @@ -27,7 +27,7 @@ class DataSourceBigstep(sources.DataSource): if url is None: return False response = url_helper.readurl(url) - decoded = json.loads(response.contents) + decoded = json.loads(response.contents.decode()) self.metadata = decoded["metadata"] self.vendordata_raw = decoded["vendordata_raw"] self.userdata_raw = decoded["userdata_raw"] -- cgit v1.2.3