We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
os.open()
1 parent ed8af08 commit 3d801a0Copy full SHA for 3d801a0
fs/osfs.py
@@ -422,8 +422,8 @@ def open(self,
422
_path = self.validatepath(path)
423
sys_path = self._to_sys_path(_path)
424
with convert_os_errors('open', path):
425
- if six.PY2 and _mode.exclusive and self.exists(path):
426
- raise FileExists(path)
+ if six.PY2 and _mode.exclusive:
+ sys_path = os.open(sys_path, os.O_CREAT | os.O_EXCL)
427
_encoding = encoding or 'utf-8'
428
return io.open(
429
sys_path,
0 commit comments