forked from M-Labs/artiq
gui/moninj: do not crash when there is no network
This commit is contained in:
parent
188d53ac05
commit
c5c7c269f7
|
@ -346,9 +346,13 @@ class MonInj(TaskObject):
|
||||||
ca = self.dm.get_core_addr()
|
ca = self.dm.get_core_addr()
|
||||||
logger.debug("core device address: %s", ca)
|
logger.debug("core device address: %s", ca)
|
||||||
if ca is None:
|
if ca is None:
|
||||||
logger.warning("could not find core device address")
|
logger.error("could not find core device address")
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
self.socket.sendto(data, (ca, 3250))
|
self.socket.sendto(data, (ca, 3250))
|
||||||
|
except:
|
||||||
|
logger.error("could not send to device",
|
||||||
|
exc_info=True)
|
||||||
|
|
||||||
async def _do(self):
|
async def _do(self):
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue