changed to use display as utils.warning doesnt exist in v2

This commit is contained in:
Brian Coca 2015-04-03 00:25:09 -04:00
parent 25f071b64c
commit 0f8bc038ec

View file

@ -26,7 +26,7 @@ import sys
import glob
import imp
from ansible import constants as C
from ansible.utils import warnings
from ansible.utils.display import Display
from ansible import errors
MODULE_CACHE = {}
@ -181,7 +181,8 @@ class PluginLoader:
try:
full_paths = (os.path.join(path, f) for f in os.listdir(path))
except OSError,e:
warnings("Error accessing plugin paths: %s" % str(e))
d = Display()
d.warning("Error accessing plugin paths: %s" % str(e))
for full_path in (f for f in full_paths if os.path.isfile(f)):
for suffix in suffixes:
if full_path.endswith(suffix):