forked from M-Labs/artiq
core: connect lazily to analyzer proxy
Otherwise artiq_compile and other uses of Core that does not access hardware/network may fail.
This commit is contained in:
parent
85850ad9e8
commit
402a5d3376
|
@ -98,15 +98,13 @@ class Core:
|
||||||
self.comm = CommKernelDummy()
|
self.comm = CommKernelDummy()
|
||||||
else:
|
else:
|
||||||
self.comm = CommKernel(host)
|
self.comm = CommKernel(host)
|
||||||
if analyzer_proxy is None:
|
self.analyzer_proxy_name = analyzer_proxy
|
||||||
self.analyzer_proxy = None
|
|
||||||
else:
|
|
||||||
self.analyzer_proxy = dmgr.get(analyzer_proxy)
|
|
||||||
|
|
||||||
self.first_run = True
|
self.first_run = True
|
||||||
self.dmgr = dmgr
|
self.dmgr = dmgr
|
||||||
self.core = self
|
self.core = self
|
||||||
self.comm.core = self
|
self.comm.core = self
|
||||||
|
self.analyzer_proxy = None
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
self.comm.close()
|
self.comm.close()
|
||||||
|
@ -306,6 +304,9 @@ class Core:
|
||||||
analyzer proxy fails. In the latter case, more details would be
|
analyzer proxy fails. In the latter case, more details would be
|
||||||
available in the proxy log.
|
available in the proxy log.
|
||||||
"""
|
"""
|
||||||
|
if self.analyzer_proxy is None:
|
||||||
|
if self.analyzer_proxy_name is not None:
|
||||||
|
self.analyzer_proxy = self.dmgr.get(self.analyzer_proxy_name)
|
||||||
if self.analyzer_proxy is None:
|
if self.analyzer_proxy is None:
|
||||||
raise IOError("No analyzer proxy configured")
|
raise IOError("No analyzer proxy configured")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue