]> git.ipfire.org Git - thirdparty/dnspython.git/commit
Add support for parametrizable __str__ in DNSException.
authorPetr Spacek <pspacek@redhat.com>
Thu, 19 Mar 2015 16:55:30 +0000 (17:55 +0100)
committerPetr Viktorin <pviktori@redhat.com>
Thu, 21 May 2015 12:25:12 +0000 (14:25 +0200)
commite6196f1e161348bc3a17b065f490afa6139b71c9
tree494d055032cf62d0b876ad976e88edae101a4e19
parent0b8ae7fd1107f330f94afc03311f233d51968a66
Add support for parametrizable __str__ in DNSException.

This change makes __init__ and __str__ parametrization simpler
and keeps backward compatiblity with old code which does not use keyword
arguments in raise().

Parametrized __str__ can be implemented simply by defining "fmt" and
"supp_kwargs" class variables in particular exception class.

Doc string is used in cases where specific message parameters were not provided
during instantiation/raise.
dns/exception.py