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

2 fixes for when Salt is installed using -OO #48226

merged 2 commits into from Jun 20, 2018


None yet
3 participants

terminalmage commented Jun 20, 2018

This fixes the following two issues:

  1. Since a function's .__doc__ attribute will be None, an exception is raised when we try to concatentate it when creating an aliased function.
  2. The string we print out for SaltInvocationError tries to include the docstring in the message, but since it is None we instead see "Passed invalid arguments to ", followed by a line break and then "None".

This PR fixes both of those issues.

terminalmage added some commits Jun 20, 2018

Fix docstring construction in alias_function when Salt installed usin…
…g -OO

This removes the docstring, so fun.__doc__ is None, which raises an
exception when we try to concatenate these.
Don't display "None" in SaltInvocationError when Salt installed using…
… -OO

When there is no docstring, just omit it from the return instead.

@terminalmage terminalmage requested a review from saltstack/team-core as a code owner Jun 20, 2018

@rallytime rallytime merged commit a172f9d into saltstack:2017.7 Jun 20, 2018

6 of 9 checks passed

default Pull Requests » Salt PR - Main Build - PY2/PY3 #9622
jenkins/PR/salt-pr-linode-cent7-py3 Pull Requests » Salt PR - Linode CentOS 7 - PY3 #5891 — ABORTED
jenkins/PR/salt-pr-rs-cent7-n Pull Requests » Salt PR - RS CentOS 7 #19944 — FAILURE
WIP ready for review
jenkins/PR/salt-pr-clone Pull Requests » Salt PR - Clone #26094 — SUCCESS
jenkins/PR/salt-pr-docs-n Pull Requests » Salt PR - Docs #18147 — SUCCESS
jenkins/PR/salt-pr-linode-ubuntu14-n Pull Requests » Salt PR - Linode Ubuntu14.04 #23820 — SUCCESS
jenkins/PR/salt-pr-linode-ubuntu16-py3 Pull Requests » Salt PR - Linode Ubuntu16.04 - PY3 #10862 — SUCCESS
jenkins/PR/salt-pr-lint-n Pull Requests » Salt PR - Code Lint #22782 — SUCCESS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment