Skip to content

Commit

Permalink
Merge pull request #45 from enthought/handle_bad_info
Browse files Browse the repository at this point in the history
handle corrupted info file, rather than crashing
  • Loading branch information
vkalatsky committed Jun 25, 2012
2 parents eddc1f8 + 771fb0f commit 7fbe6d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enstaller/eggcollect.py
Expand Up @@ -33,7 +33,10 @@ def remove(self, egg):
def info_from_metadir(meta_dir):
path = join(meta_dir, '_info.json')
if isfile(path):
info = json.load(open(path))
try:
info = json.load(open(path))
except ValueError:
return None
info['installed'] = True
info['meta_dir'] = meta_dir
return info
Expand Down

0 comments on commit 7fbe6d5

Please sign in to comment.