~ubuntu-branches/ubuntu/gutsy/python-dns/gutsy-security

« back to all changes in this revision

Viewing changes to debian/patches/03socket-error-trap.patch

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2007-05-22 20:59:24 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070522205924-9k8o81y1os1h2mhh
Tags: 2.3.1-1
* New upstream release
* Add debian/watch
* Remove debian/patches and all patches (incorporated upstream)
* Remove debian/rules entry for patch system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Nur python-dns-2.3.0/DNS/Base.py python-dns-2.3.0.new/DNS/Base.py
2
 
--- python-dns-2.3.0/DNS/Base.py        2007-05-11 16:53:00.000000000 -0400
3
 
+++ python-dns-2.3.0.new/DNS/Base.py    2007-05-11 16:56:40.000000000 -0400
4
 
@@ -169,10 +169,13 @@
5
 
               1, 0, 0, 0)
6
 
         m.addQuestion(qname, qtype, Class.IN)
7
 
         self.request = m.getbuf()
8
 
-        if protocol == 'udp':
9
 
-            self.sendUDPRequest(server)
10
 
-        else:
11
 
-            self.sendTCPRequest(server)
12
 
+        try:
13
 
+            if protocol == 'udp':
14
 
+                self.sendUDPRequest(server)
15
 
+            else:
16
 
+                self.sendTCPRequest(server)
17
 
+        except socket.error, reason:
18
 
+            raise DNSError, reason
19
 
         if self.async:
20
 
             return None
21
 
         else: