From 28c1c0dfb4ecbcc32ab0fb998fdc47f34d879705 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 20 Aug 2013 09:28:11 +0530 Subject: [PATCH] More informative error message. Fixes #638 --- powerline/lib/inotify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/powerline/lib/inotify.py b/powerline/lib/inotify.py index 1e143f5f..320cd92c 100644 --- a/powerline/lib/inotify.py +++ b/powerline/lib/inotify.py @@ -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