Skip to content

Commit

Permalink
python/samba: port open to io.open for PY2/PY3 compat
Browse files Browse the repository at this point in the history
Signed-off-by: Noel Power <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
noelpower authored and abartlet committed Sep 3, 2018
1 parent 45c0ec8 commit 9688480
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/samba/ms_display_specifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ def read_ms_ldif(filename):

out = []

f = open(filename, "rU")
from io import open
f = open(filename, "r", encoding='latin-1')
for entry in __read_raw_entries(f):
out.append(__write_ldif_one(__transform_entry(entry)))

Expand Down
3 changes: 2 additions & 1 deletion python/samba/ms_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ def __parse_schema_file(filename, objectClass):

out = []

f = open(filename, "rU")
from io import open
f = open(filename, "r", encoding='latin-1')
for entry in __read_raw_entries(f):
out.append(__write_ldif_one(__transform_entry(entry, objectClass)))

Expand Down

0 comments on commit 9688480

Please sign in to comment.