Repository navigation
Don't save irrelevant items into renewal configuration - #2663
Conversation
|
Also fixes #2277 because the logic here checks for both reasons not to save something into the renewal config. |
|
Let's see how this does with Travis. I think I've now avoided making test coverage worse, although there are more meaningful tests that we could now add to directly confirm what does and doesn't get saved in renewal config files. I think those tests might be best added after #2651 is fixed. |
| raise errors.PluginSelectionError(msg) | ||
|
|
||
|
|
||
| def _relevant(option): |
There was a problem hiding this comment.
Since it's being called from other modules, this function should not be private (ie not start with underscore).
|
#2669 should fix integration test failures |
…o_irrelevant_items
| :rtype: bool | ||
| """ | ||
| # The list() here produces a list of the plugin names as strings. | ||
| from letsencrypt import cli |
There was a problem hiding this comment.
is it bad that these are imported in a helper function? Will that cause them to get imported multiple times per call to relevant_vaules or does python do some optimazation for this
There was a problem hiding this comment.
Python will import module only once independently of the number of import module. To reimport a module, one must explicitly call reload(module).
But it is considered bad practice to not do import at the top of the file: https://www.python.org/dev/peps/pep-0008/#imports.
|
besides the one mentioned import issue this code looks good (and straightforward) to me |
Conflicts: letsencrypt/cli.py
|
Merging with review from @SwartzCr. |
Fix #2503.
#2651 slightly limits the awesomeness of this fix.
I think the basic functionality is correct now. Not ready to merge yet because tests still need updating.