Skip to content

Commit d1eb617

Browse files
authored
Encoder: switched sysfs to be a relative import compatible with Python 2 and 3
1 parent 773f9bd commit d1eb617

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Adafruit_BBIO/Encoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import logging
66
import itertools
7-
import sysfs
7+
from .sysfs import Node
88
import platform
99

1010
(major, minor, patch) = platform.release().split("-")[0].split(".")
@@ -72,7 +72,7 @@ def __init__(self, channel, pin_A, pin_B, sys_path):
7272
self.pin_A = pin_A
7373
self.pin_B = pin_B
7474
self.sys_path = sys_path
75-
self.node = sysfs.Node(sys_path)
75+
self.node = Node(sys_path)
7676

7777

7878
class RotaryEncoder(object):

0 commit comments

Comments
 (0)