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 = ""
评论列表
文章目录