def truncate(self, shelf, length, fh):
if fh is not None:
# This is an update, but there's no good way to flag that to
# __setitem__. Do an idiot check here.
assert (None, fh) in self, 'VFS thinks %s is open but LFS does not, shelf_id: %s' % (
shelf.name, shelf.id)
self[(shelf.id, None)] = shelf
return 0
评论列表
文章目录