def __init__(self, path, flags, *mode):
tracing.trace('path=%r', path)
tracing.trace('flags=%r', flags)
tracing.trace('mode=%r', mode)
self.path = path
if flags & self.write_flags:
raise IOError(errno.EROFS, 'Read only filesystem')
self.reading_pid = path == '/.pid'
if self.reading_pid:
return
try:
self.metadata = self.fuse_fs.get_metadata_in_generation(path)
except BaseException:
logging.error('Unexpected exception', exc_info=True)
raise
# if not a regular file return EINVAL
if not stat.S_ISREG(self.metadata.st_mode):
raise IOError(errno.EINVAL, 'Invalid argument')
评论列表
文章目录