Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix: exceptions.NameError: global name 'BadResponse' is not defined #1

Open
wants to merge 1 commit into from

1 participant

@llonchj
  File "/Users/llonchj/Projects/crawler/lib/python2.7/site-packages/twisted/internet/udp.py", line 149, in doRead
    self.protocol.datagramReceived(data, addr)
  File "/Users/llonchj/Projects/crawler/src/txdnspython/src/txdnspython/udp.py", line 38, in datagramReceived
    self._process_response(data)
  File "/Users/llonchj/Projects/crawler/src/txdnspython/src/txdnspython/generic.py", line 98, in _process_response
    query_response.errback(failure.Failure(BadResponse()))
exceptions.NameError: global name 'BadResponse' is not defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/txdnspython/generic.py
View
3  src/txdnspython/generic.py
@@ -27,6 +27,7 @@
import dns.exception
import dns.message
+import dns.query
class GenericDnsClientProtocol(object):
def __init__(self, reactor, one_rr_per_rrset):
@@ -95,7 +96,7 @@ def _process_response(self, wire_data):
query_response.callback(response)
else:
- query_response.errback(failure.Failure(BadResponse()))
+ query_response.errback(failure.Failure(dns.query.BadResponse()))
def _send_query(self, wire_data, query, query_response, timeout):
"""
Something went wrong with that request. Please try again.