Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looks like bug - b('').join vs b''.join #15

Closed
lefan opened this issue Jul 25, 2018 · 2 comments
Closed

Looks like bug - b('').join vs b''.join #15

lefan opened this issue Jul 25, 2018 · 2 comments

Comments

@lefan
Copy link

lefan commented Jul 25, 2018

Hi @OndrejHome.

I am not a python dev, but it looks like bug in this line:

'before': to_native(b('').join(n3_file.readlines())),

and L146
Maybe something like to_native(b''.join(n...

@OndrejHome
Copy link
Owner

Hi @lefan,
Yes, it fails why I try it with all versions of python I have on computer (2.7, 3.5, 3.6). I would say that it was working before when I was adding the changes to make printing there only when we have a to_native function available. I could remember it worked for me at that time, but now it doesn't :)

So yes, this is something for fixing. Let me take care of it and thank you a lot for finding this!
I really need to automate somehow testing of the code to catch this kind of bugs.

@OndrejHome OndrejHome self-assigned this Jul 25, 2018
@OndrejHome OndrejHome added the bug label Jul 25, 2018
@OndrejHome OndrejHome changed the title Looks like bug Looks like bug - b('').join vs b''.join Jul 25, 2018
OndrejHome pushed a commit that referenced this issue Jul 25, 2018
- tested to be broken in ansible 2.5.5 (python 2.7, 3.5, 3.6)
Thanks @lefan for reporting this and suggesting a fix! (Issue #15)
@OndrejHome
Copy link
Owner

I have merged the fix for this into master (v15). I have the #16 opened to track the cases where my lack of full testing resulted in problems like this and will try to address it there over time.
In case that current master has still same/similar issue as seen here on any of your setups please let me know. If there is no problem feel free to close this issue or I will close it in 1-2 weeks from now if there is no response considering that there was nothing problematic.

Thank you once again for reporting this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants