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

[master] Fix await None error #66277

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/66177.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added @tornado.gen.coroutine to Minion._handle_payload to fix error "object NoneType can't be used in 'await' expression"
6 changes: 3 additions & 3 deletions salt/minion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3231,7 +3231,7 @@ def ping_timeout_handler(*_):
): # A RuntimeError can be re-raised by Tornado on shutdown
self.destroy()

def _handle_payload(self, payload):
async def _handle_payload(self, payload):
if payload is not None and payload["enc"] == "aes":
if self._target_load(payload["load"]):
self._handle_decoded_payload(payload["load"])
Expand Down Expand Up @@ -3428,7 +3428,7 @@ def tune_in_no_block(self):
self.req_channel = salt.channel.client.ReqChannel.factory(self.opts)
self.async_req_channel = salt.channel.client.AsyncReqChannel.factory(self.opts)

def _process_cmd_socket(self, payload):
async def _process_cmd_socket(self, payload):
if payload is not None and payload["enc"] == "aes":
log.trace("Handling payload")
self._handle_decoded_payload(payload["load"])
Expand Down Expand Up @@ -3923,7 +3923,7 @@ def _target_load(self, load):
mp_call = _metaproxy_call(self.opts, "target_load")
return mp_call(self, load)

def _handle_payload(self, payload):
async def _handle_payload(self, payload):
mp_call = _metaproxy_call(self.opts, "handle_payload")
return mp_call(self, payload)

Expand Down