Fix for not all platforms having optional libraries at the proper versions.

pull/9832/head
Toshio Kuratomi 10 years ago
parent 27d2539fcd
commit fbadcfd44f

@ -19,6 +19,17 @@
######################################################## ########################################################
__requires__ = ['ansible']
try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import os import os
import sys import sys

@ -19,7 +19,15 @@
####################################################### #######################################################
__requires__ = ['ansible'] __requires__ = ['ansible']
import pkg_resources try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import sys import sys
import os import os

@ -19,7 +19,15 @@
# http://docs.ansible.com/playbooks_vault.html for more details. # http://docs.ansible.com/playbooks_vault.html for more details.
__requires__ = ['ansible'] __requires__ = ['ansible']
import pkg_resources try:
import pkg_resources
except Exception:
# Use pkg_resources to find the correct versions of libraries and set
# sys.path appropriately when there are multiversion installs. But we
# have code that better expresses the errors in the places where the code
# is actually used (the deps are optional for many code paths) so we don't
# want to fail here.
pass
import os import os
import sys import sys

Loading…
Cancel
Save