Skip to content

Commit

Permalink
FIX wrong use of 'b' for conversion
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
ofamera-test committed Jul 25, 2018
1 parent ea1e902 commit 28e48cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/pcs_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def compare_resources(module, res1, res2):
# seems that to_native was added in ansible-2.2 (commit 57701d7)
diff = {
'before_header': '',
'before': to_native(b('').join(n3_file.readlines())),
'before': to_native(b''.join(n3_file.readlines())),
'after_header': '',
'after': to_native(b('').join(n4_file.readlines())),
'after': to_native(b''.join(n4_file.readlines())),
}
return rc, diff

Expand Down

0 comments on commit 28e48cd

Please sign in to comment.