summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Martini <seb@dbzteam.org>2011-02-06 19:33:31 +0100
committerSebastien Martini <seb@dbzteam.org>2011-02-06 19:33:31 +0100
commit83a1bab088cf63b6a2b65add6989be87c060f5ff (patch)
tree3c86984fcf4d554e4c16c8d1beced7869385d9b7
parent7afc73252ea1de3c5bb61eb3803126def0048dd0 (diff)
downloadpyinotify-83a1bab088cf63b6a2b65add6989be87c060f5ff.tar.gz
Disable ctypes when inotify_syscalls is successfully imported.
-rwxr-xr-xpython2/pyinotify.py3
-rwxr-xr-xpython3/pyinotify.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py
index 6b4c72a..639fa18 100755
--- a/python2/pyinotify.py
+++ b/python2/pyinotify.py
@@ -83,6 +83,9 @@ except ImportError:
try:
import inotify_syscalls
+ # As soon as inotify_syscalls are used make sure ctypes won't
+ # ger inadvertently be used instead.
+ ctypes = None
except ImportError:
inotify_syscalls = None
diff --git a/python3/pyinotify.py b/python3/pyinotify.py
index 720c2b9..0186e3f 100755
--- a/python3/pyinotify.py
+++ b/python3/pyinotify.py
@@ -85,6 +85,9 @@ except ImportError:
try:
import inotify_syscalls
+ # As soon as inotify_syscalls are used make sure ctypes won't
+ # get inadvertently be used instead.
+ ctypes = None
except ImportError:
inotify_syscalls = None