sys.platform does not start with 'bsd' on any of the BSDs implementing
kqueue.
Use an explicit enumeration of those that do (at least in recent
releases).
diff --git a/src/watchdog/utils/platform.py b/src/watchdog/utils/platform.py
index cc46192..fc4527d 100644
--- a/src/watchdog/utils/platform.py
+++ b/src/watchdog/utils/platform.py
@@ -33,7 +33,7 @@
return PLATFORM_DARWIN
elif sys.platform.startswith('linux'):
return PLATFORM_LINUX
- elif sys.platform.startswith('bsd'):
+ elif sys.platform.startswith(('dragonfly', 'freebsd', 'netbsd', 'openbsd', )):
return PLATFORM_BSD
else:
return PLATFORM_UNKNOWN