import dns.rdataclass
class UnsupportedAlgorithm(dns.exception.DNSException):
- """Raised if an algorithm is not supported."""
+ """The DNSSEC algorithm is not supported."""
pass
class ValidationFailure(dns.exception.DNSException):
pass
class UnexpectedEnd(SyntaxError):
- """Raised if text input ends unexpectedly."""
+ """Text input ended unexpectedly."""
pass
class TooBig(DNSException):
- """The message is too big."""
+ """The DNS message is too big."""
pass
class Timeout(DNSException):
- """The operation timed out."""
+ """The DNS operation timed out."""
pass
import dns.wiredata
class ShortHeader(dns.exception.FormError):
- """Raised if the DNS packet passed to from_wire() is too short."""
+ """The DNS packet passed to from_wire() is too short."""
pass
class TrailingJunk(dns.exception.FormError):
- """Raised if the DNS packet passed to from_wire() has extra junk
- at the end of it."""
+ """The DNS packet passed to from_wire() has extra junk at the end of it."""
pass
class UnknownHeaderField(dns.exception.DNSException):
- """Raised if a header field name is not recognized when converting from
- text into a message."""
+ """The header field name was not recognized when converting from text
+ into a message."""
pass
class BadEDNS(dns.exception.FormError):
- """Raised if an OPT record occurs somewhere other than the start of
+ """OPT record occured somewhere other than the start of
the additional data section."""
pass
class BadTSIG(dns.exception.FormError):
- """Raised if a TSIG record occurs somewhere other than the end of
+ """A TSIG record occured somewhere other than the end of
the additional data section."""
pass
class UnknownTSIGKey(dns.exception.DNSException):
- """Raised if we got a TSIG but don't know the key."""
+ """A TSIG with an unknown key was received."""
pass
class Message(object):
NAMERELN_COMMONANCESTOR = 4
class EmptyLabel(dns.exception.SyntaxError):
- """Raised if a label is empty."""
+ """A DNS label is empty."""
pass
class BadEscape(dns.exception.SyntaxError):
- """Raised if an escaped code in a text format name is invalid."""
+ """An escaped code in a text format of DNS name is invalid."""
pass
class BadPointer(dns.exception.FormError):
- """Raised if a compression pointer points forward instead of backward."""
+ """A DNS compression pointer points forward instead of backward."""
pass
class BadLabelType(dns.exception.FormError):
- """Raised if the label type of a wire format name is unknown."""
+ """The label type in DNS name wire format is unknown."""
pass
class NeedAbsoluteNameOrOrigin(dns.exception.DNSException):
- """Raised if an attempt is made to convert a non-absolute name to
- wire when there is also a non-absolute (or missing) origin."""
+ """An attempt was made to convert a non-absolute name to
+ wire when there was also a non-absolute (or missing) origin."""
pass
class NameTooLong(dns.exception.FormError):
- """Raised if a name is > 255 octets long."""
+ """A DNS name is > 255 octets long."""
pass
class LabelTooLong(dns.exception.SyntaxError):
- """Raised if a label is > 63 octets long."""
+ """A DNS label is > 63 octets long."""
pass
class AbsoluteConcatenation(dns.exception.DNSException):
- """Raised if an attempt is made to append anything other than the
- empty name to an absolute name."""
+ """An attempt was made to append anything other than the
+ empty name to an absolute DNS name."""
pass
class NoParent(dns.exception.DNSException):
- """Raised if an attempt is made to get the parent of the root name
+ """An attempt was made to get the parent of the root name
or the empty name."""
pass
class UnknownOpcode(dns.exception.DNSException):
- """Raised if an opcode is unknown."""
+ """An DNS opcode is unknown."""
pass
def from_text(text):
import dns.rdatatype
class UnexpectedSource(dns.exception.DNSException):
- """Raised if a query response comes from an unexpected address or port."""
+ """A DNS query response came from an unexpected address or port."""
pass
class BadResponse(dns.exception.FormError):
- """Raised if a query response does not respond to the question asked."""
+ """A DNS query response does not respond to the question asked."""
pass
def _compute_expiration(timeout):
class UnknownRcode(dns.exception.DNSException):
- """Raised if an rcode is unknown."""
+ """A DNS rcode is unknown."""
pass
def from_text(text):
_unknown_class_pattern = re.compile('CLASS([0-9]+)$', re.I);
class UnknownRdataclass(dns.exception.DNSException):
- """Raised when a class is unknown."""
+ """A DNS class is unknown."""
pass
def from_text(text):
SimpleSet = dns.set.Set
class DifferingCovers(dns.exception.DNSException):
- """Raised if an attempt is made to add a SIG/RRSIG whose covered type
+ """An attempt was made to add a DNS SIG/RRSIG whose covered type
is not the same as that of the other rdatas in the rdataset."""
pass
class IncompatibleTypes(dns.exception.DNSException):
- """Raised if an attempt is made to add rdata of an incompatible type."""
+ """An attempt was made to add DNS RR data of an incompatible type."""
pass
class Rdataset(dns.set.Set):
_unknown_type_pattern = re.compile('TYPE([0-9]+)$', re.I);
class UnknownRdatatype(dns.exception.DNSException):
- """Raised if a type is unknown."""
+ """DNS resource record type is unknown."""
pass
def from_text(text):
import dns.util
class BadSigTime(dns.exception.DNSException):
- """Raised when a SIG or RRSIG RR's time cannot be parsed."""
+ """Time in DNS SIG or RRSIG resource record cannot be parsed."""
pass
def sigtime_to_posixtime(what):
import _winreg
class NXDOMAIN(dns.exception.DNSException):
- """The query name does not exist."""
+ """The DNS query name does not exist."""
pass
class YXDOMAIN(dns.exception.DNSException):
- """The query name is too long after DNAME substitution."""
+ """The DNS query name is too long after DNAME substitution."""
pass
# The definition of the Timeout exception has moved from here to the
pass
class NotAbsolute(dns.exception.DNSException):
- """Raised if an absolute domain name is required but a relative name
- was provided."""
+ """An absolute domain name is required but a relative name was provided."""
pass
class NoRootSOA(dns.exception.DNSException):
- """Raised if for some reason there is no SOA at the root name.
- This should never happen!"""
+ """There is no SOA RR at the DNS root name. This should never happen!"""
pass
class NoMetaqueries(dns.exception.DNSException):
- """Metaqueries are not allowed."""
- pass
+ """DNS metaqueries are not allowed."""
class Answer(object):
"""DNS stub resolver answer
DELIMITER = 6
class UngetBufferFull(dns.exception.DNSException):
- """Raised when an attempt is made to unget a token when the unget
- buffer is full."""
+ """An attempt was made to unget a token when the unget buffer was full."""
pass
class Token(object):
import dns.name
class BadTime(dns.exception.DNSException):
- """Raised if the current time is not within the TSIG's validity time."""
+ """The current time is not within the TSIG's validity time."""
pass
class BadSignature(dns.exception.DNSException):
- """Raised if the TSIG signature fails to verify."""
+ """The TSIG signature fails to verify."""
pass
class PeerError(dns.exception.DNSException):
pass
class PeerBadKey(PeerError):
- """Raised if the peer didn't know the key we used"""
+ """The peer didn't know the key we used"""
pass
class PeerBadSignature(PeerError):
- """Raised if the peer didn't like the signature we sent"""
+ """The peer didn't like the signature we sent"""
pass
class PeerBadTime(PeerError):
- """Raised if the peer didn't like the time we sent"""
+ """The peer didn't like the time we sent"""
pass
class PeerBadTruncation(PeerError):
- """Raised if the peer didn't like amount of truncation in the TSIG we sent"""
+ """The peer didn't like amount of truncation in the TSIG we sent"""
pass
# TSIG Algorithms
import dns.grange
class BadZone(dns.exception.DNSException):
- """The zone is malformed."""
+ """The DNS zone is malformed."""
pass
class NoSOA(BadZone):
- """The zone has no SOA RR at its origin."""
+ """The DNS zone has no SOA RR at its origin."""
pass
class NoNS(BadZone):
- """The zone has no NS RRset at its origin."""
+ """The DNS zone has no NS RRset at its origin."""
pass
class UnknownOrigin(BadZone):
- """The zone's origin is unknown."""
+ """The DNS zone's origin is unknown."""
pass
class Zone(object):