]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Amend doc strings for all DNSExceptions to make them suitable for direct printing.
authorPetr Spacek <pspacek@redhat.com>
Thu, 15 Jan 2015 16:27:27 +0000 (17:27 +0100)
committerPetr Spacek <pspacek@redhat.com>
Thu, 12 Feb 2015 11:34:17 +0000 (12:34 +0100)
15 files changed:
dns/dnssec.py
dns/exception.py
dns/message.py
dns/name.py
dns/opcode.py
dns/query.py
dns/rcode.py
dns/rdataclass.py
dns/rdataset.py
dns/rdatatype.py
dns/rdtypes/ANY/RRSIG.py
dns/resolver.py
dns/tokenizer.py
dns/tsig.py
dns/zone.py

index f1d70cea25af3e5e27d8621a3a7e85b34c8670dc..20925254f49826cf012e1bb6c76e0fd8555813dd 100644 (file)
@@ -29,7 +29,7 @@ import dns.rdatatype
 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):
index 575cebe8952b7bfdbd43192acd9dedeea8220df1..e07b099d88b5bc3f7d819fabba9e77774293ee09 100644 (file)
@@ -33,13 +33,13 @@ class SyntaxError(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
index e523931481bc600cbceaf1df82f034565274e73a..ba714bda2d71c678e19dcb35d0162d19cbdd8dbe 100644 (file)
@@ -37,31 +37,30 @@ import dns.tsig
 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):
index 5eb925d64fdb4d94df7cd7bbe309bcd426022a1d..f70a9a534f555003ccddc6195bfcbf2f03c27610 100644 (file)
@@ -39,41 +39,41 @@ NAMERELN_EQUAL = 3
 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
 
index 3258c34cd93491cfd9a42988a8a453226eeaff32..5a68517d7e5a16d1b5a3dfb66f98f9172ce79d05 100644 (file)
@@ -39,7 +39,7 @@ _by_value = dict([(y, x) for x, y in _by_text.iteritems()])
 
 
 class UnknownOpcode(dns.exception.DNSException):
-    """Raised if an opcode is unknown."""
+    """An DNS opcode is unknown."""
     pass
 
 def from_text(text):
index 29965cacdf82a9a7642c7d09618464c8a6e3b196..6eaf62d1e6aae9d1f31588d48e376f714d823b57 100644 (file)
@@ -32,11 +32,11 @@ import dns.rdataclass
 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):
index 7807782aa4dc1d899470da6edfb2a95e7f197160..cd43ab5e440c38fff1f4e6a59ae6bd2dedff6741 100644 (file)
@@ -53,7 +53,7 @@ _by_value = dict([(y, x) for x, y in _by_text.iteritems()])
 
 
 class UnknownRcode(dns.exception.DNSException):
-    """Raised if an rcode is unknown."""
+    """A DNS rcode is unknown."""
     pass
 
 def from_text(text):
index 7601e70c3a47ba3e51264381105d71864375d20d..96815836260fb8ed54a363a6f2c08c0f0be05ce6 100644 (file)
@@ -66,7 +66,7 @@ _metaclasses = {
 _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):
index dcd2b401913639a99bb5dc1c66ae7c53e1ba4a05..389205ce94657d1bea7b93fec0cfd90b286c09dc 100644 (file)
@@ -29,12 +29,12 @@ import dns.set
 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):
index 7c21f2ec24033f08cdf8aafd204463e09da07510..5d914ae72567b6dc7bce53e56e2361a692acbcf3 100644 (file)
@@ -180,7 +180,7 @@ _singletons = {
 _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):
index 77ce2bfdf5add746b9397354f84b4e9b9c428275..5c16052c0b6feb7bfad261085b79220cf8914ca1 100644 (file)
@@ -23,7 +23,7 @@ import dns.rdata
 import dns.rdatatype
 
 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):
index f52b55560c41fd57ef793a7c0802b3ae3e6f72e3..79de3ab4488389bf5bbd28eec7f7fc04b2fee5fe 100644 (file)
@@ -44,11 +44,11 @@ if sys.platform == 'win32':
     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
@@ -66,19 +66,15 @@ class NoNameservers(dns.exception.DNSException):
     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
index ab5687310dad3f0f8e08568d212267cb9ee870dc..96e82df80160c775e2212af6812fe20bcdf5f53b 100644 (file)
@@ -42,8 +42,7 @@ COMMENT = 5
 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):
index 2dd4b42fa40daabd62ee75451abe701f20275224..01ab5a2fa283bb9fc9094b74ca5cb4b20b17bc64 100644 (file)
@@ -25,11 +25,11 @@ import dns.rdataclass
 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):
@@ -37,19 +37,19 @@ 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
index 6f5adf57f0c74f4bf6a63df457b7b2c8553b6711..b7fc6dd3c978691c9e92a47c6c9be4afc7102a20 100644 (file)
@@ -37,19 +37,19 @@ except ImportError:
     from io import StringIO
 
 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):