Repository navigation
Conversation
|
Ah crap, my black plugin auto formatted everything in the file. I can revert, it's only 4 lines of change, but do you all have an auto formatter for this project already? If so I'll add that in to my editor. |
|
@raddessi no, we don't have auto formatting yet, though there's been some discussion about possibly adopting |
waynew
left a comment
There was a problem hiding this comment.
Just a couple of minor tweaks. Also, would it be possible to write a test for this? Or, if there's already some tests over this section, updating the test so it properly exercises this section on Python2 and 3.
Otherwise, 👍
| for mod in config: | ||
| fun = mod.keys()[0] | ||
| fun_cfg = mod.values()[0] | ||
| fun = list(mod.keys())[0] |
There was a problem hiding this comment.
This can just be list(mod)[0] - the default creating a list from mapping is to use the keys.
| event = {} | ||
| fun = mod.keys()[0] | ||
| fun_cfg = mod.values()[0] | ||
| fun = list(mod.keys())[0] |
There was a problem hiding this comment.
Same thing here - list(mod)[0]
|
I'm closing this out myself (I didn't realize we had that capability) as it is superceded by #56243, thanks all |
What does this PR do?
Fixes (for me) the napalm_beacon module's
validatefunction when running on python 3.What issues does this PR fix or reference?
I hit a bug trying to use the napalm_beacon on python 3, due to the dict_keys and dict_values objects not supporting indexing any more.
With just the pillar code copied out of the napalm_beacon example page
Tests written?
[NOTICE] Bug fixes or features added to Salt require tests.
Please review the test documentation for details on how to implement tests into Salt's test suite.
No
Commits signed with GPG?
No
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.