diff --git a/python2/pyinotify.py b/python2/pyinotify.py index d2f0816..5253336 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -213,7 +213,7 @@ def init(self): libc_name = None try: libc_name = ctypes.util.find_library(try_libc_name) - except (OSError, IOError): + except (OSError, IOError, RuntimeError): pass # Will attemp to load it with None anyway. if sys.version_info >= (2, 6): diff --git a/python3/pyinotify.py b/python3/pyinotify.py index bc24313..52c4787 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -208,7 +208,7 @@ def init(self): libc_name = None try: libc_name = ctypes.util.find_library(try_libc_name) - except (OSError, IOError): + except (OSError, IOError, RuntimeError): pass # Will attemp to load it with None anyway. self._libc = ctypes.CDLL(libc_name, use_errno=True)