]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Don't use a bare except: 300/head
authorJason Madden <jamadden@gmail.com>
Wed, 31 Jan 2018 23:30:54 +0000 (17:30 -0600)
committerJason Madden <jamadden@gmail.com>
Wed, 31 Jan 2018 23:30:54 +0000 (17:30 -0600)
This catches things like KeyboardInterrupt and SystemExit that shouldn't be caught here.

Under gevent, it breaks Timeout handling.

dns/resolver.py

index 00323835d33bc7003c424a7bf02ed16356326a69..853be99a22779f69bf015c100af307b24d58734b 100644 (file)
@@ -1209,7 +1209,7 @@ def _getaddrinfo(host=None, service=None, family=socket.AF_UNSPEC, socktype=0,
                                 v4addrs.append(rdata.address)
                 except dns.resolver.NXDOMAIN:
                     raise socket.gaierror(socket.EAI_NONAME)
-                except:
+                except Exception:
                     raise socket.gaierror(socket.EAI_SYSTEM)
     port = None
     try: