From 19c0e05532784e9b736b3ab960dc256b8d69ba6c Mon Sep 17 00:00:00 2001 From: Torben Date: Fri, 9 Aug 2019 11:29:06 +0200 Subject: [PATCH] Add RuntimeError to possible exceptions when searching for libc --- python2/pyinotify.py | 2 +- python3/pyinotify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)