From 9e2a3f4bbba03a5a363594a7fb616455d80cb62b 2011-03-13 06:08:44 From: Fernando Perez Date: 2011-03-13 06:08:44 Subject: [PATCH] Better report errors where select is missing POLLHUP/POLERR (win32). Closes gh-153. --- diff --git a/IPython/deathrow/ipy_vimserver.py b/IPython/deathrow/ipy_vimserver.py index d055cd5..1902c6a 100644 --- a/IPython/deathrow/ipy_vimserver.py +++ b/IPython/deathrow/ipy_vimserver.py @@ -74,7 +74,12 @@ import socket, select import os, threading, subprocess import re -ERRCONDS = select.POLLHUP|select.POLLERR +try: + ERRCONDS = select.POLLHUP|select.POLLERR +except AttributeError: + raise ImportError("Vim server not supported on this platform - select " + "missing necessary POLLHUP/POLLERR functionality") + SERVER = None ip = ipapi.get()