control.py 文件源码

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

项目:ave 作者: sonyxperiadev 项目源码 文件源码
def __init__(self, address, authkey, timeout, optimist=True, sock=None,
        profile=None, home=None):
        self._connection = None
        self.address     = address
        self.authkey     = authkey
        self.timeout     = timeout or None
        self.optimist    = optimist
        self.profile     = profile
        self.home        = home
        if sock:
            self._connection = BlockingConnection(self.address, sock)
        try:
            import vcsjob
            self.job_guid = vcsjob.get_guid()
        except: # guid not set or vcsjob not even installed. how to log then?
            self.job_guid = None
        # don't import ave.panotti every time it is used. can't import it at
        # the module scope because ave.panotti also imports ave.network.control
        # which leads to an import error. assign the module to self instead.
        import ave.panotti as panotti
        setattr(self, 'panotti', panotti)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号