File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
openwisp_controller/connection/connectors Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -196,7 +196,12 @@ def exec_command(
196
196
logger .exception (e )
197
197
raise e
198
198
# store command exit status
199
- exit_status = stdout .channel .recv_exit_status ()
199
+ # workaround https://github.com/paramiko/paramiko/issues/1815
200
+ # workaround https://github.com/paramiko/paramiko/issues/1787
201
+ # Ref. https://docs.paramiko.org/en/stable/api/channel.html#paramiko.channel.Channel.recv_exit_status # noqa
202
+ stdout .channel .status_event .wait (timeout = timeout )
203
+ assert stdout .channel .status_event .is_set ()
204
+ exit_status = stdout .channel .exit_status
200
205
# log standard output
201
206
# try to decode to UTF-8, ignoring unconvertible characters
202
207
# https://docs.python.org/3/howto/unicode.html#the-string-type
You can’t perform that action at this time.
0 commit comments