Removing unnecessary exception rising

This fixed the problem I [reported](https://github.com/ipython/ipython/commit/ba56cc9dd02f29cfe8a8c0bffa05750c5511462f#commitcomment-2815772) at a commit that was made 2 years ago.