Simplify to just use opt in runner

Simplify to just use opts in runner to get show_jid. Had thought
I'd need to do that so not to print when called via python api or
netapi, but doesn't seem to be an issue.
This commit is contained in:
Barney Sowood 2023-10-08 14:06:05 +01:00 committed by Megan Wilhite
parent fd0e3d2be2
commit 6c48871640
2 changed files with 3 additions and 4 deletions

View file

@ -30,9 +30,8 @@ class SaltRun(salt.utils.parsers.SaltRunOptionParser):
try:
if check_user(self.config["user"]):
pr = salt.utils.profile.activate_profile(profiling_enabled)
show_jid = self.config.get("show_jid", False)
try:
ret = runner.run(full_return=True, show_jid=show_jid)
ret = runner.run(full_return=True)
# In older versions ret['data']['retcode'] was used
# for signaling the return code. This has been
# changed for the orchestrate runner, but external

View file

@ -207,7 +207,7 @@ class Runner(RunnerClient):
print(docs[fun])
# TODO: move to mixin whenever we want a salt-wheel cli
def run(self, full_return=False, show_jid=False):
def run(self, full_return=False):
"""
Execute the runner sequence
"""
@ -288,7 +288,7 @@ class Runner(RunnerClient):
return async_pub["jid"] # return the jid
# otherwise run it in the main process
if show_jid:
if self.opts.get("show_jid"):
print(f"jid: {self.jid}")
if self.opts.get("eauth"):