IBM-Security / isam-ansible-roles

DEPRECATED Ansible Custom Modules, Handlers and Tasks for ISAM. Requires "ibmsecurity" python package.
Apache License 2.0
24 stars 43 forks source link

logger broken #166

Closed sygilber closed 4 years ago

sygilber commented 5 years ago

As I was troubleshooting another issue, I almost became crazy because I could no longer see any logger() statement displayed in console with "-vvv" passed to Ansible. (-;

Apparently, recent code change (https://github.com/IBM-Security/isam-ansible-roles/commit/6048a398d6148b4bfacbb36842410f81163aeea2#diff-fab442aaab4b16a2eb0a40fda197d58d) makes logging not working anymore (only in V2.7?). I believe this has to do with how the StringIO is imported.

I replaced in isam.py the following:

from io import StringIO

With this (as before):

from StringIO import StringIO

And everything got resolved.

What is the proper way to resolve this ?

sygilber commented 5 years ago

@djorgen-ibm would appreciate your input in this one. Thanks

ram-ibm commented 4 years ago

I am trying to find the issue here between python 2 and 3. Any chance you found any documentation that suggested using "from StringIO import StringIO" please?

sygilber commented 4 years ago

PR 166 submitted

sygilber commented 4 years ago

Resolved with merge https://github.com/IBM-Security/isam-ansible-roles/pull/168