From e90e6c57a442f771ce6622446a61afdeb81489e9 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 18 Feb 2016 20:38:00 +0530 Subject: [PATCH] no error if network is down --- oml/localnodes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oml/localnodes.py b/oml/localnodes.py index ce8bbfd..8319e24 100644 --- a/oml/localnodes.py +++ b/oml/localnodes.py @@ -186,6 +186,8 @@ class LocalNodes4(LocalNodesBase): s.setsockopt (socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, self._TTL) try: s.sendto(packet + b'\0', sockaddr) + except OSError: + pass except: logger.debug('LocalNodes4.send failed', exc_info=True) s.close()