remove compiling bug in keepass.py
If i am used the keepass.py as a module for ansible i find in bug in line 131 and a -vvv debug shows:
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_keepass_payload_a1veq_9s/ansible_keepass_payload.zip/ansible/modules/keepass.py", line 131, in <module>
ImportError: cannot import name 'CredentialsIntegrityError' from 'pykeepass.exceptions' (/home/user/.local/lib/python3.8/site-packages/pykeepass/exceptions.py)
fatal: [pivpn]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"database": "/tmp/test_db.kdbx",
"hostname": "testuser",
"keyfile": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"password_length": 30,
"purpose": "MariaDB",
"username": "mariadb-admin"
}
},
"msg": "Failed to import the required Python library (pykeepass) on pivpn's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"
}
so i changed
from pykeepass.exceptions import CredentialsIntegrityError
to
import pykeepass.exceptions
and thats works