Skip to content

Commit 55390c5

Browse files
committed
Avoid crashing when invalid __install__.json file exists.
Fixes #293
1 parent 4a8e8b2 commit 55390c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/manage/installs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ def _get_installs(install_dir):
2323
try:
2424
with p.open() as f:
2525
j = json.load(f)
26+
except ValueError:
27+
LOGGER.warn(
28+
"Failed to read install at %s. You may have a broken "
29+
"install, which can be cleaned up by deleting the directory.",
30+
d
31+
)
32+
LOGGER.debug("ERROR", exc_info=True)
33+
continue
2634
except FileNotFoundError:
2735
continue
2836

0 commit comments

Comments
 (0)