From 9929887c703d694ac8a660df0c8e7d2427523767 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Tue, 26 Mar 2019 08:15:12 -0500 Subject: [PATCH] Update inventory caching to remove deprecation warnings (#53976) --- plugins/inventory/gcp_compute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inventory/gcp_compute.py b/plugins/inventory/gcp_compute.py index b947e4e..7e319ac 100644 --- a/plugins/inventory/gcp_compute.py +++ b/plugins/inventory/gcp_compute.py @@ -370,7 +370,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): cache_needs_update = False if cache: try: - results = self.cache.get(cache_key) + results = self._cache[cache_key] for project in results: for zone in results[project]: self._add_hosts(results[project][zone], config_data, False) @@ -392,7 +392,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): cached_data[project][zone] = resp.get('items') if cache_needs_update: - self.cache.set(cache_key, cached_data) + self._cache[cache_key] = cached_data @staticmethod def _legacy_script_compatible_group_sanitization(name):