fix https://github.com/sagemathinc/smc/issues/1169 -- "jupyter exception right when closing tab"
fix https://github.com/sagemathinc/smc/issues/1169 -- "jupyter exception right when closing tab"

tscholl2/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,sagemathinc/smc,DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,sagemathinc/smc,DrXyzzy/smc,tscholl2/smc,tscholl2/smc