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

Petr Spacek pspacek at redhat.com
Mon Jul 13 13:12:13 UTC 2015


On 10.7.2015 20:06, Veronika Kabatova wrote:
> ----- Original Message -----
>> From: "Tomas Babej" <tbabej at redhat.com>
>> To: "Veronika Kabatova" <vkabatov at redhat.com>, freeipa-devel at redhat.com
>> Sent: Friday, July 10, 2015 2:56:58 PM
>> Subject: Re: [Freeipa-devel] [PATCH] 0001 Enhance the DNSNotARecordError message
>>
>>
>>
>> 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.
> 
> 
> Good to know, thanks for clarifying. Attached modified version which doesn't
> break tests, even if PEP8 checker is not happy with it.

Personally-opinionated-NACK.

I would like to avoid advertising --force options when possible. --force
should not be necessary in proper setups and advertising it will make people
to use it instead of fixing underlying problems.

Can we *please* drop this patch?

-- 
Petr^2 Spacek




More information about the Freeipa-devel mailing list