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

[Test/sample_test] Fix arguments parsing in yaml config. #2150

Closed

Conversation

numerology
Copy link

@numerology numerology commented Sep 17, 2019

Skip when arguments section is empty.
This problem is blocking #2141


This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign gaoning777
You can assign the PR to them by writing /assign @gaoning777 in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -100,7 +100,8 @@ def run(self):
except OSError as ose:
print('Config file with the same name not found, use default args:{}'.format(ose))
else:
self._test_args.update(raw_args['arguments'])
if raw_args['arguments']:
Copy link
Contributor

Choose a reason for hiding this comment

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

this will fail if there is no 'argument'.

Copy link
Contributor

Choose a reason for hiding this comment

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

You need to check if arguments exists and check the value is not None

@numerology
Copy link
Author

/close
Solved offline.

@numerology numerology closed this Sep 17, 2019
@numerology numerology deleted the fix-config-argument-spec branch September 18, 2019 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants