mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
catch ValueError when the cache json.load method fails, fixes #245
This commit is contained in:
@@ -282,7 +282,7 @@ class _ModulePickling(object):
|
|||||||
try:
|
try:
|
||||||
with open(self._get_path('index.json')) as f:
|
with open(self._get_path('index.json')) as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
except IOError:
|
except (IOError, ValueError):
|
||||||
self.__index = {}
|
self.__index = {}
|
||||||
else:
|
else:
|
||||||
# 0 means version is not defined (= always delete cache):
|
# 0 means version is not defined (= always delete cache):
|
||||||
|
|||||||
Reference in New Issue
Block a user