From df0350400ce174ec3d674e0271dcc66a407ce371 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 14 Jul 2015 15:19:02 -0700 Subject: [PATCH] more careful with incompatible systems --- python2/pyinotify.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/python2/pyinotify.py b/python2/pyinotify.py index 53ac263..f306caf 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -55,8 +55,13 @@ def __init__(self, version): import platform system = platform.system().lower() if not system.startswith('linux') and not system.startswith('freebsd'): - sys.stderr.write("inotify is not available on %s\n" % system) - sys.exit(1) + # sys.stderr.write("inotify is not available on %s\n" % system) + # sys.exit(1) + # Soften the blow of this not working. + # If you have something like Django >=1.7 in the same environment + # as you have pyinotify, the django will try to import this module + # and use it if it doesn't raise an ImportError. + raise ImportError("inotify is not available on %s\n" % system) # Import directives