1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/parsing
Peter Oliver 95cfceda98 Catch DistributionNotFound when pycrypto is absent (#15731)
* Catch DistributionNotFound when pycrypto is absent

On Solaris 11, module `pkg_resources` throws `DistributionNotFound` on import if `cryptography` is installed but `pycrypto` is not.  This change causes that situation to be handled gracefully.

I'm not using Paramiko or Vault, so I my understanding is that I don't
need `pycrpto`.  I could install `pycrypto` to make the error go away, but:
- The latest released version of `pycrypto` doesn't build cleanly on Solaris (https://github.com/dlitz/pycrypto/issues/184).
- Solaris includes an old version of GMP that triggers warnings every time Ansible runs (https://github.com/ansible/ansible/issues/6941).  I notice that I can silence these warnings with `system_warnings` in `ansible.cfg`, but not installing `pycrypto` seems like a safer solution.

* Ignore only `pkg_resources.DistributionNotFound`, not other exceptions.
2016-05-19 11:39:34 -07:00
..
utils Fixing up jsonify and adding unit tests 2016-02-29 14:51:23 -05:00
vault Catch DistributionNotFound when pycrypto is absent (#15731) 2016-05-19 11:39:34 -07:00
yaml Use a unicode format string so that we don't convert to byte strings 2016-02-26 10:29:37 -08:00
__init__.py Break apart a looped dependency to show a warning when parsing playbooks 2015-10-27 12:39:42 -07:00
dataloader.py bytes when passing to os.path.* and opening the file, text at other times 2016-04-29 22:20:22 -07:00
mod_args.py Added more info to the no action detected error 2016-02-08 16:51:10 -05:00
quoting.py Break apart a looped dependency to show a warning when parsing playbooks 2015-10-27 12:39:42 -07:00
splitter.py Take previous jinja2 blocks into account in splitter when we see quotes 2016-03-28 15:43:43 -04:00