From ed99e380d7d4fea5bac5de1f80a833194634e5f4 Mon Sep 17 00:00:00 2001 From: David Halter Date: Fri, 19 Jul 2013 10:54:49 +0200 Subject: [PATCH] catch ValueError when the cache json.load method fails, fixes #245 --- jedi/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jedi/cache.py b/jedi/cache.py index d8306bcc..ba3c1fcc 100644 --- a/jedi/cache.py +++ b/jedi/cache.py @@ -282,7 +282,7 @@ class _ModulePickling(object): try: with open(self._get_path('index.json')) as f: data = json.load(f) - except IOError: + except (IOError, ValueError): self.__index = {} else: # 0 means version is not defined (= always delete cache):