From 9c86ca3a19e3c557feabbd0e4167372e950553d8 Mon Sep 17 00:00:00 2001
From: Scott Lahteine <thinkyhead@users.noreply.github.com>
Date: Sat, 6 Aug 2022 03:48:24 -0500
Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Schema=20catch=20missing=20pip?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 buildroot/share/PlatformIO/scripts/schema.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

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'))