]> 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:38:31 +0000 (12:38 +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 2dd4a677f8d369282975310a749e0e9d52b1156a..52f9ba6fdf55c998981832f14d5f052f7805429c 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 869a24764ce1bb6687b6736b521a34ebfdf24e53..d672a3a053f3daa4ec1a942dfe3211f1ec1abbbf 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 daa52612eae20051a5c859f8d5ed9cda182391c1..8ffa674b4c2e979704df35b17c2e09214481ab1f 100644 (file)
@@ -38,41 +38,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 a12d82b32fdc015ac78dd7452b10228c68cf1d5e..52e0ce647d7aaf5c4c7b9a5d612eb956e5c01629 100644 (file)
@@ -39,7 +39,7 @@ _by_value = dict([(y, x) for x, y in _by_text.items()])
 
 
 class UnknownOpcode(dns.exception.DNSException):
-    """Raised if an opcode is unknown."""
+    """An DNS opcode is unknown."""
     pass
 
 def from_text(text):
index 2a252c72855c96c279484f50510179c7b7cf28e5..8b0a2271ad1671c79a55d8bdf3d14c2d749d26b2 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 fb9c30cdecc9c1450a4ea3343f95a0aa7424cae7..8b9f8bd65a4ba51b3b04ad303ee3240d05f79a75 100644 (file)
@@ -53,7 +53,7 @@ _by_value = dict([(y, x) for x, y in _by_text.items()])
 
 
 class UnknownRcode(dns.exception.DNSException):
-    """Raised if an rcode is unknown."""
+    """A DNS rcode is unknown."""
     pass
 
 def from_text(text):
index eda701a542e3329fa5762bb969007424bd5f434c..c5845a05084c25949380843b1088af7ed5f8f300 100644 (file)
@@ -63,7 +63,7 @@ _metaclasses = frozenset([NONE, ANY])
 _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 e7fea8d7327e29c93c272db5baf2e4b443224abc..7a9cc3759f00ac18051ee1230294e321d8050735 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 d5d9f7ca76d20fb55e936a95401545194d4f934f..f2f5e9855562758928b88f28121bb4b76d11d8a0 100644 (file)
@@ -172,7 +172,7 @@ _singletons = frozenset([SOA, NXT, DNAME, NSEC, NSEC3, NSEC3PARAM])
 _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 6f39cb81103df6be5e0f326c9db3a848f5901c60..e9b625b91f6acf749b9bf59e71c97b50c01c8773 100644 (file)
@@ -25,7 +25,7 @@ import dns.rdatatype
 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):
index 3d3cccbda6d6a89e7124b079919e0a69304c4078..d59f413ab0018e1b3bc7859ca19858cbff91776d 100644 (file)
@@ -47,11 +47,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
@@ -69,18 +69,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 adac5e290ec9c951fef68e292d699ff76fb86be4..c21451002ddcede260780eda3b300171da010131 100644 (file)
@@ -34,8 +34,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 4333016ed270b53c6f1b4620bea06d615bc53250..3de11c934fa2e3d37b56d1d742d92a48d0ab4006 100644 (file)
@@ -26,11 +26,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):
@@ -38,19 +38,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 ece898a4cf5fb104e2849cbb6d81e664ed3ba65a..b12776450769186347358ff453c7ba81976c02cf 100644 (file)
@@ -34,19 +34,19 @@ import dns.ttl
 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):