Skip to content

Commit

Permalink
Fix keyboard interrupt error
Browse files Browse the repository at this point in the history
  • Loading branch information
tbarbette committed Jun 13, 2024
1 parent 847e430 commit f0d28ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion npf/executor/sshexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def exec(self, cmd, bin_paths : List[str] = None, queue: Queue = None, options =
except KeyboardInterrupt:
event.terminate()
ssh.close()
return -1, out, err, -1
return -1, output[0], output[1], 0
if timeout is not None:
if timeout < 0:
event.terminate()
Expand All @@ -180,6 +180,7 @@ def exec(self, cmd, bin_paths : List[str] = None, queue: Queue = None, options =
ssh=None



return pid,output[0], output[1],ret
except socket.gaierror as e:
print("Error while connecting to %s" % self.addr)
Expand Down

0 comments on commit f0d28ab

Please sign in to comment.