diff --git a/buildroot/share/PlatformIO/scripts/schema.py b/buildroot/share/PlatformIO/scripts/schema.py index 767748757e..8261b1e4fb 100755 --- a/buildroot/share/PlatformIO/scripts/schema.py +++ b/buildroot/share/PlatformIO/scripts/schema.py @@ -393,8 +393,12 @@ def main(): except ImportError: print("Installing YAML module ...") import subprocess - subprocess.run(['python3', '-m', 'pip', 'install', 'pyyaml']) - import yaml + try: + subprocess.run(['python3', '-m', 'pip', 'install', 'pyyaml']) + import yaml + except: + print("Failed to install YAML module") + return print("Generating YML ...") dump_yaml(schema, Path('schema.yml'))