Simplifies test if binary mode.
This commit is contained in:
parent
8ae339d870
commit
70e1169fe7
@ -50,7 +50,7 @@ def system_path(path):
|
|||||||
|
|
||||||
|
|
||||||
def _open(path, mode):
|
def _open(path, mode):
|
||||||
if mode.find('b') == -1:
|
if 'b' in mode:
|
||||||
return open(system_path(path), mode, encoding='utf-8')
|
return open(system_path(path), mode, encoding='utf-8')
|
||||||
else:
|
else:
|
||||||
return open(system_path(path), mode)
|
return open(system_path(path), mode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user