Skip to content

Commit

Permalink
update to latest pyfuse3 API for setting file handle attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
pcgrosen committed Aug 7, 2019
1 parent ee46c7b commit 425b5cb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bashfs/bashfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,16 @@ async def readdir(self, inode, off, token):
await self.lookup(inode, BASHFS_RUN), 1)
return None

async def open(self, inode, flags, ctx, file_info):
async def open(self, inode, flags, ctx):
path = self._get_node(inode).make_path()
l.debug("open: %r", path)
file_handle = next(self._file_generator)
proc = await trio.open_process(["bash", "-c", path.decode()],
stdout=subprocess.PIPE,
stdin=subprocess.PIPE)
self._proc_map[file_handle] = proc
file_info["direct_io"] = 1
file_info["keep_cache"] = 0
return file_handle, file_info
return pyfuse3.FileInfo(fh=file_handle, direct_io=True,
keep_cache=False, nonseekable=True)

async def read(self, file_handle, offset, length):
p = self._proc_map[file_handle]
Expand Down

0 comments on commit 425b5cb

Please sign in to comment.