New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cert-show: check if certificate_out is in options #771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested; works. ACK.
ipaclient/plugins/cert.py
Outdated
| certificate_out = options.pop('certificate_out') | ||
| if certificate_out is None: | ||
| raise errors.ValidationError(name='certificate-out', | ||
| error=_(u'cannot be empty')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would better be checked inside check_writable_file, as that will fix the issue for other commands (e.g. ca-show as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I did not notice the same check is in the ca plugin as well so I unified these.
If --certificate-out was specified on the command line, it will appear among the options. If it was empty, it will be None. This check was done properly in the ca plugin. Lets' just unify how this is handled and improve user experience by announcing which option causes the failure. https://pagure.io/freeipa/issue/6885
|
Is it ok now, then? |
|
@frasertweedale @HonzaCholasta can you please continue review of this PR? |
If --certificate-out was specified on the command line, it will appear
among the options. If it was empty, it will be None, though.
https://pagure.io/freeipa/issue/6885