mirror of https://github.com/ansible/ansible.git
Add PyYAML check for libyaml support.
parent
d758d5bab1
commit
817ec5ab48
@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
"""Show python and pip versions."""
|
||||||
|
|
||||||
|
import json
|
||||||
|
|
||||||
|
try:
|
||||||
|
import yaml
|
||||||
|
except ImportError:
|
||||||
|
yaml = None
|
||||||
|
|
||||||
|
try:
|
||||||
|
from yaml import CLoader
|
||||||
|
except ImportError:
|
||||||
|
CLoader = None
|
||||||
|
|
||||||
|
print(json.dumps(dict(
|
||||||
|
yaml=bool(yaml),
|
||||||
|
cloader=bool(CLoader),
|
||||||
|
)))
|
Loading…
Reference in New Issue