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