[Freeipa-devel] [PATCH] 0046 Properly handle non-existent CA file

Ana Krivokapic akrivoka at redhat.com
Wed Jul 17 15:39:58 UTC 2013


On 07/17/2013 04:57 PM, Jan Cholasta wrote:
> Hi,
>
> On 17.7.2013 16:38, Ana Krivokapic wrote:
>> Hello,
>>
>> This patch addresses ticket https://fedorahosted.org/freeipa/ticket/3785.
>>
>
> NACK, this results in an unnecessarily ugly error message "[Errno 2] No such
> file or directory: 'file'".
>
> I would suggest something like this instead:
>
> except IOError as e:
>     raise ScriptError("Failed to open %s: %s" % (ca_cert_name, e.strerror))

Fixed.
>
> Can you please also check what happens if you pass non-existent filename to
> --dirsrv_pkcs12 and --http_pkcs12?
>
> Honza
>

I added a more specific error message to cover these cases.

Updated patch attached.

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-akrivoka-0046-02-Properly-handle-non-existent-cert-files.patch
Type: text/x-patch
Size: 1878 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130717/f932dd3e/attachment.bin>


More information about the Freeipa-devel mailing list