##// END OF EJS Templates
Improve error handling in blocking %%script
Takafumi Arakaki -
Show More
@@ -221,8 +221,11 b' class ScriptMagics(Magics, Configurable):'
221 return
221 return
222 p.kill()
222 p.kill()
223 print "Process is killed."
223 print "Process is killed."
224 except:
224 except OSError:
225 print "Failed to kill process properly (pid={0})".format(p.pid)
225 pass
226 except Exception as e:
227 print "Error while terminating subprocess (pid=%i): %s" \
228 % (p.pid, e)
226 return
229 return
227 out = py3compat.bytes_to_str(out)
230 out = py3compat.bytes_to_str(out)
228 err = py3compat.bytes_to_str(err)
231 err = py3compat.bytes_to_str(err)
General Comments 0
You need to be logged in to leave comments. Login now