mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 03:51:20 -03:00
pexpect: Check for signalstatus being none
This would happen if e.g. the child shell did `exit 1` before an `expect()`.
This commit is contained in:
@@ -253,7 +253,7 @@ class SpawnedProc(object):
|
||||
failtype = pexpect_error_type(err)
|
||||
# If we get an EOF, we check if the process exited with a signal.
|
||||
# This shows us e.g. if it crashed
|
||||
if failtype == 'EOF' and self.spawn.signalstatus != 0:
|
||||
if failtype == 'EOF' and self.spawn.signalstatus is not None and self.spawn.signalstatus != 0:
|
||||
failtype = "SIGNAL " + Signals(self.spawn.signalstatus).name
|
||||
|
||||
fmtkeys = {"failtype": failtype, "pat": escape(pat)}
|
||||
|
||||
Reference in New Issue
Block a user