diff --git a/daemons/ganeti-confd b/daemons/ganeti-confd
index c560e7fddd5619b2589b41599e3a993f4500d4bb..b3cf688416aa3363b788d27d336131c88cde41e7 100755
--- a/daemons/ganeti-confd
+++ b/daemons/ganeti-confd
@@ -29,9 +29,13 @@ It uses UDP+HMAC for authentication with a global cluster key.
 import os
 import sys
 import logging
-import pyinotify
 import time
 
+try:
+  from pyinotify import pyinotify
+except ImportError:
+  import pyinotify
+
 from optparse import OptionParser
 
 from ganeti import asyncnotifier
diff --git a/lib/asyncnotifier.py b/lib/asyncnotifier.py
index 1498ad0e614e15a009c39d9fad3666ced47a1152..a0fb2d0931e336e6e289897f2a596ef1221c0933 100644
--- a/lib/asyncnotifier.py
+++ b/lib/asyncnotifier.py
@@ -22,9 +22,13 @@
 """Asynchronous pyinotify implementation"""
 
 
-import pyinotify
 import asyncore
 
+try:
+    from pyinotify import pyinotify
+except ImportError:
+    import pyinotify
+
 
 class AsyncNotifier(asyncore.file_dispatcher):
   """An asyncore dispatcher for inotify events.