We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent def9738 commit 3e00d6cCopy full SHA for 3e00d6c
1 file changed
ev3dev/core.py
@@ -41,7 +41,6 @@
41
import io
42
import fnmatch
43
import numbers
44
-import fcntl
45
import array
46
import mmap
47
import ctypes
@@ -52,6 +51,14 @@
52
51
from struct import pack, unpack
53
from subprocess import Popen
54
+try:
55
+ # This is a linux-specific module.
56
+ # It is required by the Button() class, but failure to import it may be
57
+ # safely ignored if one just needs to run API tests on Windows.
58
+ import fcntl
59
+except ImportError:
60
+ print("WARNING: Failed to import fcntl. Button class will be unuseable!")
61
+
62
INPUT_AUTO = ''
63
OUTPUT_AUTO = ''
64
0 commit comments