mirror of https://github.com/ansible/ansible.git
Compatibility of gce.py (Google Cloud Ansible inventory) with Python 3 (#26032)
* Compatibility of gce.py (inventory) with Python 3 * Revert './secrets.py' file check (will import 'secrets' from PYTHONPATH) Instead of checking if secrets.py exists in the current directory, this commit will make gce import 'secrets' from one of PYTHONPATH's paths. There are 2 possibilities: 1. secrets.py will be used if secrets.GCE_PARAMS and secrets.GCE_KEYWORD_PARAMS are declared. 2. secrets.py will be ignored if secrets.GCE_PARAMS and secrets.GCE_KEYWORD_PARAMS aren't declared. This could happen in Python >=3.6 where a module named 'secrets' could be imported if a custom secrets.py doesn't exist in PYTHONPATH. Check out https://www.python.org/dev/peps/pep-0506/ and https://docs.python.org/3/library/secrets.html for more information.pull/24929/merge
parent
9ab9945cf3
commit
e45d5b7e8e
Loading…
Reference in New Issue