Merge remote-tracking branch 'kovidgoyal/fix-578' into develop

This commit is contained in:
Kim Silkebækken 2013-07-31 14:28:03 +02:00
commit b4ee360498
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,8 @@ def load_inotify():
# if the one chosen by ctypes is compatible with the currently
# loaded one.
raise INotifyError('INotify not available on windows')
if sys.platform == 'darwin':
raise INotifyError('INotify not available on OS X')
import ctypes
if not hasattr(ctypes, 'c_ssize_t'):
raise INotifyError('You need python >= 2.7 to use inotify')

View File

@ -162,7 +162,7 @@ class TreeWatcher(object):
try:
w = INotifyTreeWatcher(path, ignore_event=ignore_event)
except (INotifyError, DirTooLarge) as e:
if logger is not None:
if logger is not None and not isinstance(e, INotifyError):
logger.warn('Failed to watch path: {0} with error: {1}'.format(path, e))
w = DummyTreeWatcher(path)
self.watches[path] = w