We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c0949e commit 1a84141Copy full SHA for 1a84141
openshift/dynamic/client.py
@@ -599,8 +599,11 @@ def __init_cache(self, refresh=False):
599
self._cache = {}
600
refresh = True
601
else:
602
- with open(self.__cache_file, 'r') as f:
603
- self._cache = json.load(f, cls=cache_decoder(self.client))
+ try:
+ with open(self.__cache_file, 'r') as f:
604
+ self._cache = json.load(f, cls=cache_decoder(self.client))
605
+ except Exception:
606
+ return self.__init_cache(refresh=True)
607
self._load_server_info()
608
self.discover()
609
0 commit comments