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
ckeygen doesn't provide a default for the key file #6607
Comments
Fixed and submitted pull request -- commit b321af5. |
Hi Saurabh, Thanks for working on this. This appears to be missing a test. I'm not entirely sure if the call to cheers |
Hi saurabh, Thanks for working on this some more! This is starting to look pretty good :) A few minor nitpicks:
Thanks again, and I look forward to merging this :) lvh |
(In [40615]) Branching to 'ckeygen-default-file-6607' |
Hi again :) There are some twistedchecker failures:
exarkun has reminded me of the argument that trying to name arguments with an underscore prefix is suboptimal. The short version of that argument (as I understand it) is that because you can call arguments named with an underscore without realizing they're private, the effect of "private" is gone. For anything else (like class, function or method names), you have to type the underscore, so you know you're doing something internal. (I think that the underscore still has value for documentation purposes; from what I understand, JP disagrees.) The solution to this would be a private class _CKeygenCommands or something with methods:
For testing, you instantiate one of those with a fake
That way, public API doesn't change, but you still get your DI-able, testable thing. cheers |
|
Fixing proposal with a different approach from the above. 1- parsing and raw_input is done inside the GeneralOption class 2- key generation is done in a single function using a di(ct)spatch-table to pick the right function 3- added parsing tests |
(In [43817]) Branching to ckeygen-default-file-6607-2. |
Branch from github integrated and committed to a branch, builds forced. |
Hi ioggstream, Thanks for picking this up. I am sorry about the long turnaround; we are, as always, endeavoring to improve round-trip-time for code reviews. I've run your code through the buildbot and there are numerous issues that will need to be addressed; lots of coding-standard issues, some tests failures due to optional dependencies not being conditionally imported, and suchlike. Please have a look at the build results and fix the errors; when you think they're fixed re-submit for review and I will endeavor to run them again promptly. In addition:
I hope you'll have some time to look at this again at some point; let me know if you're still interested. Thanks again for your contribution! |
Replying to ioggstream:
The buildbot should only be reporting errors in your specific change. If not, it's a twistedchecker bug, not your problem - you just need to file the bug and link it here so that any irrelevant warnings will pass review. In this fix, don't even fix all the stuff in
I believe the issue is that you added a test which is not properly skipped?
Great.
You do need it to respect the old behavior according to the relevant policy, but wouldn't adding a default do the same thing?
You're welcome; thank you for your contribution :). |
For example:
It shows a file in parenthesis, but doesn't actually use that as a default value if nothing is specified. It should.
Attachments:
Searchable metadata
The text was updated successfully, but these errors were encountered: