From 6bc709adfec4af902619f12a922d7e086ac13eeb 2011-03-13 06:07:50 From: Fernando Perez Date: 2011-03-13 06:07:50 Subject: [PATCH] Better report errors where select is missing POLLHUP/POLERR (win32). Closes gh-153. --- diff --git a/IPython/Extensions/ipy_vimserver.py b/IPython/Extensions/ipy_vimserver.py index f23b712..056983d 100644 --- a/IPython/Extensions/ipy_vimserver.py +++ b/IPython/Extensions/ipy_vimserver.py @@ -73,7 +73,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 = IPython.ipapi.get()