Fix broken conditional statement

Because sys.platform will never return "linux" on python2 -- only
"linux2" -- this statement will always be False. Instead, use the
startswith idiom to both provide the intended behavior and ensure future
compatibility with python3.
This commit is contained in:
Chris Wood 2018-07-25 14:57:18 -04:00 committed by Jean-Paul Calderone
parent 76bb84a77f
commit f5ca88c1f4

View File

@ -75,7 +75,7 @@ def _get_inotify_module():
from allmydata.windows import inotify
elif runtime.platform.supportsINotify():
from twisted.internet import inotify
elif sys.platform != "linux":
elif not sys.platform.startswith("linux"):
from allmydata.watchdog import inotify
else:
raise NotImplementedError("filesystem notification needed for Magic Folder is not supported.\n"