🔧 Schema catch missing pip
This commit is contained in:
@@ -393,8 +393,12 @@ def main():
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
print("Installing YAML module ...")
|
print("Installing YAML module ...")
|
||||||
import subprocess
|
import subprocess
|
||||||
|
try:
|
||||||
subprocess.run(['python3', '-m', 'pip', 'install', 'pyyaml'])
|
subprocess.run(['python3', '-m', 'pip', 'install', 'pyyaml'])
|
||||||
import yaml
|
import yaml
|
||||||
|
except:
|
||||||
|
print("Failed to install YAML module")
|
||||||
|
return
|
||||||
|
|
||||||
print("Generating YML ...")
|
print("Generating YML ...")
|
||||||
dump_yaml(schema, Path('schema.yml'))
|
dump_yaml(schema, Path('schema.yml'))
|
||||||
|
Reference in New Issue
Block a user