file_juggler.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:piwheels 作者: bennuttall 项目源码 文件源码
def handle_fs_request(self, queue):
        """
        Handle incoming messages from :class:`FsClient` instances.
        """
        msg, *args = queue.recv_pyobj()
        try:
            handler = {
                'EXPECT': self.do_expect,
                'VERIFY': self.do_verify,
                'STATVFS': self.do_statvfs,
            }[msg]
            result = handler(*args)
        except Exception as exc:
            self.logger.error('error handling fs request: %s', msg)
            queue.send_pyobj(['ERR', exc])
        else:
            queue.send_pyobj(['OK', result])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号