[Freeipa-devel] [PATCH] 0001 Enhance the DNSNotARecordError message

Tomas Babej tbabej at redhat.com
Fri Jul 10 12:56:58 UTC 2015



On 07/09/2015 01:49 PM, Veronika Kabatova wrote:
> The attached patch solves the <https://fedorahosted.org/freeipa/ticket/3959> ticket.
> 
> Veronika Kabatova
> 
> 
> 

Hello,

thanks for the patch.

Actually, the doctest does not pass:

$ ipa-run-tests /usr/lib/python2.7/site-packages/ipalib/errors.py
--doctest-modules
=============================================================================================================
test session starts
=============================================================================================================
platform linux2 -- Python 2.7.10 -- py-1.4.28 -- pytest-2.6.4
plugins: multihost, sourceorder
collected 85 items

../ipalib/errors.py
...................F..............F..................................................

==================================================================================================================
FAILURES
===================================================================================================================
_________________________________________________________________________________________________
[doctest] ipalib.errors.DNSNotARecordError
__________________________________________________________________________________________________
1137     """
1138     **4019** Raised when a hostname is not a DNS A/AAAA record
1139
1140     For example:
1141
1142     >>> raise DNSNotARecordError()
Differences (unified diff with -expected +actual):
    @@ -1,4 +1,6 @@
     Traceback (most recent call last):
    -  ...
    -DNSNotARecordError: Host does not have corresponding DNS A/AAAA record,
    -use --force to continue anyway
    +  File "/usr/lib64/python2.7/doctest.py", line 1315, in __run
    +    compileflags, 1) in test.globs
    +  File "<doctest ipalib.errors.DNSNotARecordError[0]>", line 1, in
<module>
    +    raise DNSNotARecordError()
    +DNSNotARecordError: Host does not have corresponding DNS A/AAAA
record, use --force to continue anyway

/usr/lib/python2.7/site-packages/ipalib/errors.py:1142: DocTestFailure

The reason for the mismatch here is that you wrapped the line - in this
case, we need to violate the PEP8, and allow the length of the line
exceed 80 characters.

HTH,

Tomas




More information about the Freeipa-devel mailing list