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 c1490fa commit 2bd14c3Copy full SHA for 2bd14c3
openshift/dynamic/client.py
@@ -112,8 +112,11 @@ def __init_cache(self, refresh=False):
112
self.__cache = {}
113
refresh = True
114
else:
115
- with open(self.__cache_file, 'r') as f:
116
- self.__cache = json.load(f, cls=cache_decoder(self))
+ try:
+ with open(self.__cache_file, 'r') as f:
117
+ self.__cache = json.load(f, cls=cache_decoder(self))
118
+ except Exception:
119
+ self.__init_cache(refresh=True)
120
self._load_server_info()
121
self.__resources.update(self.parse_api_groups())
122
0 commit comments