Skip to content

Commit 6c84b3b

Browse files
authored
Merge pull request #202 from dplanella/patch-2
Encoder: corrected kernel check logic
2 parents a22cd5f + 2d54d00 commit 6c84b3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Adafruit_BBIO/Encoder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import itertools
77
import platform
88

9-
if not platform.release().startswith('4.4'):
9+
(major, minor, patch) = platform.release().split("-")[0].split(".")
10+
if not (int(major) >= 4 and int(minor) >= 4):
1011
raise ImportError(
1112
'The Encoder module requires Linux kernel version >= 4.4.x.\n'
1213
'Please upgrade your kernel to use this module.\n'

0 commit comments

Comments
 (0)