aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/policies/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
index 14ed2a07..ca9b181a 100644
--- a/sos/policies/__init__.py
+++ b/sos/policies/__init__.py
@@ -596,7 +596,11 @@ No changes will be made to system configuration.
for preset_path in os.listdir(presets_path):
preset_path = os.path.join(presets_path, preset_path)
- preset_data = json.load(open(preset_path))
+ try:
+ preset_data = json.load(open(preset_path))
+ except ValueError:
+ continue
+
for preset in preset_data.keys():
pd = PresetDefaults(preset, opts=SoSOptions())
data = preset_data[preset]