From 3c25a39b3e332c752f0dc255882ac07e15a0ba68 Mon Sep 17 00:00:00 2001 From: "Ryan S. Brown" Date: Thu, 16 Feb 2017 09:42:46 -0500 Subject: [PATCH] [cloud][aws] Use binary read for inventory cache file --- contrib/inventory/ec2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/inventory/ec2.py b/contrib/inventory/ec2.py index 31e90f20d4..88dd8845aa 100755 --- a/contrib/inventory/ec2.py +++ b/contrib/inventory/ec2.py @@ -1526,7 +1526,7 @@ class Ec2Inventory(object): def load_index_from_cache(self): ''' Reads the index from the cache file sets self.index ''' - with open(self.cache_path_index, 'r') as f: + with open(self.cache_path_index, 'rb') as f: self.index = json.load(f) def write_to_cache(self, data, filename):