##// END OF EJS Templates
vfs: make the default opener mode binary...
Matt Harbison -
r50469:2506c3ac default
parent child Browse files
Show More
@@ -425,7 +425,7 b' class vfs(abstractvfs):'
425 def __call__(
425 def __call__(
426 self,
426 self,
427 path: bytes,
427 path: bytes,
428 mode: bytes = b"r",
428 mode: bytes = b"rb",
429 atomictemp=False,
429 atomictemp=False,
430 notindexed=False,
430 notindexed=False,
431 backgroundclose=False,
431 backgroundclose=False,
@@ -612,7 +612,7 b' class readonlyvfs(proxyvfs):'
612 def __init__(self, vfs: "vfs"):
612 def __init__(self, vfs: "vfs"):
613 proxyvfs.__init__(self, vfs)
613 proxyvfs.__init__(self, vfs)
614
614
615 def __call__(self, path: bytes, mode: bytes = b'r', *args, **kw):
615 def __call__(self, path: bytes, mode: bytes = b'rb', *args, **kw):
616 if mode not in (b'r', b'rb'):
616 if mode not in (b'r', b'rb'):
617 raise error.Abort(_(b'this vfs is read only'))
617 raise error.Abort(_(b'this vfs is read only'))
618 return self.vfs(path, mode, *args, **kw)
618 return self.vfs(path, mode, *args, **kw)
General Comments 0
You need to be logged in to leave comments. Login now