Python 3.5 socket OSError: [Errno 101] Network is unreachable

/********************************************************************************
 *       Python 3.5 socket OSError: [Errno 101] Network is unreachable
 * 说明:
 *     在网络状态一切正常的时候没有出现这个问题,当出现比较长时间的网络连接中断
 * 的情况下,会出现这个现象,try...except...解决。
 *
 *                                              2017-3-1 深圳 南山平山村 曾剑锋
 ********************************************************************************/

一、错误现象:
    Traceback (most recent call last):
      File "localDetect.py", line 22, in <module>
        socketClient.sendto(mac.encode('utf-8'), address)  
    OSError: [Errno 101] Network is unreachable

    [1]+  Done(1)                    python localDetect.py

二、错误原因:
    网络状态不好,socket的sendto等待超时。
原文地址:https://www.cnblogs.com/zengjfgit/p/6484726.html