gateway.py 文件源码

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

项目:floranet 作者: Fluent-networks 项目源码 文件源码
def get(self, host):
        """Method to handle gateway GET requests"""  
        try:
            g = yield Gateway.find(where=['host = ?', host], limit=1)
            # Return a 404 if not found.
            if g is None:
                abort(404, message={'error': "Gateway {} doesn't exist.".format(host)})
            returnValue(marshal(g, self.fields))

        except TimeoutError:
            log.error("REST API timeout retrieving gateway {host}",
                      host=host)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号