cloud_link.py 文件源码

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

项目:Parlay 作者: PromenadeSoftware 项目源码 文件源码
def __init__(self):
        parlay.ParlayCommandItem.__init__(self, "parlay.items.cloud_link", "Cloud Link")
        self._http_agent = Agent(self._reactor)
        self.channel_uri = None
        self.cloud_factory = None

        if CloudLinkSettings.PRIVATE_KEY_LOCATION is None:
            raise RuntimeError("CloudLinkSettings.PRIVATE_KEY_LOCATION must be set for cloud to work")

        if CloudLinkSettings.UUID_LOCATION is None:
            raise RuntimeError("CloudLinkSettings.UUID_LOCATION must be set for cloud to work")

        try:
            with open(CloudLinkSettings.UUID_LOCATION, 'r') as uuid_file:
                self.uuid = uuid_file.read()

        except IOError:
            logger.warn("Error reading UUID file. Has this device been registered?")
            self.uuid = ""
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号