mirror of
https://github.com/powerline/powerline.git
synced 2025-07-06 13:34:58 +02:00
Merge remote-tracking branch 'kovidgoyal/fix-578' into develop
This commit is contained in:
commit
b4ee360498
@ -26,6 +26,8 @@ def load_inotify():
|
|||||||
# if the one chosen by ctypes is compatible with the currently
|
# if the one chosen by ctypes is compatible with the currently
|
||||||
# loaded one.
|
# loaded one.
|
||||||
raise INotifyError('INotify not available on windows')
|
raise INotifyError('INotify not available on windows')
|
||||||
|
if sys.platform == 'darwin':
|
||||||
|
raise INotifyError('INotify not available on OS X')
|
||||||
import ctypes
|
import ctypes
|
||||||
if not hasattr(ctypes, 'c_ssize_t'):
|
if not hasattr(ctypes, 'c_ssize_t'):
|
||||||
raise INotifyError('You need python >= 2.7 to use inotify')
|
raise INotifyError('You need python >= 2.7 to use inotify')
|
||||||
|
@ -162,7 +162,7 @@ class TreeWatcher(object):
|
|||||||
try:
|
try:
|
||||||
w = INotifyTreeWatcher(path, ignore_event=ignore_event)
|
w = INotifyTreeWatcher(path, ignore_event=ignore_event)
|
||||||
except (INotifyError, DirTooLarge) as e:
|
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))
|
logger.warn('Failed to watch path: {0} with error: {1}'.format(path, e))
|
||||||
w = DummyTreeWatcher(path)
|
w = DummyTreeWatcher(path)
|
||||||
self.watches[path] = w
|
self.watches[path] = w
|
||||||
|
Loading…
x
Reference in New Issue
Block a user