_py/path: tiny change to `ensure` to silence EncodingWarning
We're not supposed to diverge here, but make this change to fix an unavoidable EncodingWarning that is otherwise raised in pytest's test suite. The behavior should be exactly the same besides the warning, hopefully that won't cause confusion.
This commit is contained in:
parent
8288b52090
commit
43f610abf4
|
@ -953,7 +953,7 @@ class LocalPath:
|
|||
else:
|
||||
p.dirpath()._ensuredirs()
|
||||
if not p.check(file=1):
|
||||
p.open("w").close()
|
||||
p.open("wb").close()
|
||||
return p
|
||||
|
||||
@overload
|
||||
|
|
Loading…
Reference in New Issue