More informative error message. Fixes #638

This commit is contained in:
Kovid Goyal 2013-08-20 09:28:11 +05:30
parent 70e279afde
commit 28c1c0dfb4
1 changed files with 4 additions and 1 deletions

View File

@ -131,7 +131,10 @@ class INotify(object):
def handle_error(self):
import ctypes
eno = ctypes.get_errno()
raise OSError(eno, self.os.strerror(eno))
extra = ''
if eno == errno.ENOSPC:
extra = 'You may need to increase the inotify limits on your system, via /proc/sys/inotify/max_user_*'
raise OSError(eno, self.os.strerror(eno) + extra)
def __del__(self):
# This method can be called during interpreter shutdown, which means we