File: pydns_timeout.patch

package info (click to toggle)
python-dns 2.3.6-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 232 kB
  • sloc: python: 1,483; makefile: 8
file content (30 lines) | stat: -rw-r--r-- 1,165 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Sent upstream Aug 8, 2013
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=718547
Index: python-dns-2.3.6/DNS/Base.py
===================================================================
--- python-dns-2.3.6.orig/DNS/Base.py	2013-08-06 22:58:40.830642636 -0400
+++ python-dns-2.3.6/DNS/Base.py	2013-08-06 22:59:20.570641461 -0400
@@ -276,6 +276,11 @@
                 # servers worked:
                 first_socket_error = first_socket_error or e
                 continue
+            except TimeoutError, t:
+                first_socket_error = first_socket_error or t
+                continue
+            if self.response:
+                break
         if not self.response and first_socket_error:
             raise first_socket_error
 
@@ -313,6 +318,11 @@
             except socket.error, e:
                 first_socket_error = first_socket_error or e
                 continue
+            except TimeoutError, t:
+                first_socket_error = first_socket_error or t
+                continue
+            if self.response:
+                break
         if not self.response and first_socket_error:
             raise first_socket_error