pexpect / ptyprocess

Run a subprocess in a pseudo terminal
https://ptyprocess.readthedocs.io/en/latest/
Other
222 stars 71 forks source link

sys.__stdin__ can be None #38

Closed minrk closed 7 years ago

minrk commented 7 years ago

When the FD is not valid.

Technically, I think the same is possible for all std streams.

When this is the case, the block raises an AttributeError, which was not among the caught exceptions.

cf https://github.com/jupyterhub/jupyterhub/issues/1108

minrk commented 7 years ago

This could also have been fixed by adding AttributeError to the exception list on L70. I figured that wouldn't be desirable since it would catch AttributeErrors due to potential future typos elsewhere, as well.

takluyver commented 7 years ago

Thanks Min, this looks reasonable to me. I'll give it a day or two in case @jquast or @MountainRider want to have a look.

MountainRider commented 7 years ago

I don't see any problems with this change.