File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
openwisp_controller/connection Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ def _connect(self, address):
149149 auth_timeout = app_settings .SSH_AUTH_TIMEOUT ,
150150 banner_timeout = app_settings .SSH_BANNER_TIMEOUT ,
151151 timeout = app_settings .SSH_CONNECTION_TIMEOUT ,
152- ** params
152+ ** params ,
153153 )
154154 except paramiko .ssh_exception .AuthenticationException as e :
155155 # the authentication failure may be caused by the issue
@@ -207,7 +207,7 @@ def exec_command(
207207 if not stdout .channel .status_event .wait (
208208 timeout = timeout - (time .perf_counter () - start_cmd )
209209 ):
210- log_message = "Command timeout exceeded ."
210+ log_message = f "Command timed out after { timeout } seconds ."
211211 logger .info (log_message )
212212 raise CommandTimeoutException (log_message )
213213
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ def launch_command(command_id):
7979 command .save ()
8080 except CommandTimeoutException as e :
8181 command .status = "failed"
82- command ._add_output (_ (f"{ e } " ))
82+ command ._add_output (_ (f"The command took longer than expected: { e } " ))
8383 command .save ()
8484 except Exception as e :
8585 logger .exception (
You can’t perform that action at this time.
0 commit comments