check sys.path issue

This commit is contained in:
Steven Robertson 2020-09-22 19:29:37 -07:00
parent a7705a3435
commit 4dea09a924
1 changed files with 2 additions and 3 deletions

View File

@ -769,14 +769,13 @@ class PushFileService(Service):
# load them up in sys.path for later import
# ensure we don't add to sys.path the same path we've already seen
for extra_path in extra_sys_paths:
# jjj
# validate extra_sys_paths are what we expect
raise ValueError(extra_sys_paths)
# store extra paths in cached set for O(1) lookup
if extra_path not in self._extra_sys_paths:
# not sure if it matters but we could prepend to sys.path instead if we need to
sys.path.append(extra_path)
self._extra_sys_paths.add(extra_path)
# see if this is an issue with python2 loading packages
sys.path.append("/Users/runner/.ansible/collections/ansible_collections/ansible/posix")
@expose(policy=AllowParents())
@arg_spec({