From c5c7c269f7b23ef620746c5a0b22a2bbe57e057f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 4 Jun 2016 16:30:30 -0400 Subject: [PATCH] gui/moninj: do not crash when there is no network --- artiq/gui/moninj.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/artiq/gui/moninj.py b/artiq/gui/moninj.py index c0e662ea8..25605c4c2 100644 --- a/artiq/gui/moninj.py +++ b/artiq/gui/moninj.py @@ -346,9 +346,13 @@ class MonInj(TaskObject): ca = self.dm.get_core_addr() logger.debug("core device address: %s", ca) if ca is None: - logger.warning("could not find core device address") + logger.error("could not find core device address") else: - self.socket.sendto(data, (ca, 3250)) + try: + self.socket.sendto(data, (ca, 3250)) + except: + logger.error("could not send to device", + exc_info=True) async def _do(self): while True: