mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
367 B
Python
22 lines
367 B
Python
6 years ago
|
#!/usr/bin/env python
|
||
|
"""Show python and pip versions."""
|
||
5 years ago
|
from __future__ import (absolute_import, division, print_function)
|
||
|
__metaclass__ = type
|
||
6 years ago
|
|
||
|
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),
|
||
|
)))
|