Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

stlaz
Copy link
Contributor

@stlaz stlaz commented May 9, 2017

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

Copy link
Contributor

@frasertweedale frasertweedale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested; works. ACK.

certificate_out = options.pop('certificate_out')
if certificate_out is None:
raise errors.ValidationError(name='certificate-out',
error=_(u'cannot be empty'))
Copy link
Contributor

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).

Copy link
Contributor Author

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
@stlaz
Copy link
Contributor Author

stlaz commented May 16, 2017

Is it ok now, then?

@martbab
Copy link
Contributor

martbab commented May 22, 2017

@frasertweedale @HonzaCholasta can you please continue review of this PR?

@HonzaCholasta HonzaCholasta added ack Pull Request approved, can be merged pushed Pull Request has already been pushed labels May 24, 2017
@HonzaCholasta
Copy link
Contributor

master:

  • 1ed1717 ca/cert-show: check certificate_out in options

ipa-4-5:

  • 9ce5d6b ca/cert-show: check certificate_out in options

@stlaz stlaz deleted the cert_out branch September 11, 2017 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
4 participants