Not all runners (e.g. orchestra) have runner_parameters#750
Merged
lakshmi-kannan merged 1 commit intomasterfrom Jun 20, 2018
Merged
Not all runners (e.g. orchestra) have runner_parameters#750lakshmi-kannan merged 1 commit intomasterfrom
lakshmi-kannan merged 1 commit intomasterfrom
Conversation
Kami
reviewed
Jun 20, 2018
|
|
||
| with open(destination_path, 'w') as fp: | ||
| fp.write(result) | ||
| runner_parameters = runner.get('runner_parameters', None) |
Member
There was a problem hiding this comment.
LGTM, although I would prefer runner.get('runner_parameters', {}), then we can get rid of if and one level of indentation :P
Contributor
Author
There was a problem hiding this comment.
Won't work in this case since the file generation and writing etc is needed only when runner_parameters are present but otherwise your suggestion is valid.
Kami
approved these changes
Jun 20, 2018
Member
|
Would be better to communicate in PR description more nicely what it is and why it's needed. I dig through links that this PR fixes the st2docs build, but others might guess on our cryptic context-hidden changes. |
Contributor
Author
|
@armab Sorry, I meant to type it in but laziness got the better of me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the orchestra changes merged to st2 master, the script to generate runner documentation was failing. Reason: orchestra runner doesn't have 'runner_parameters' section. This PR makes the script work with runners with no runner_parameters.