Skip to content

Commit aeb0155

Browse files
authored
Switch fake-sys submodule from rhempel to ddemidov (#397)
* Switch fake-sys submodule from rhempel to ddemidov * Updated to latest fake-sys * Fix board_info_dir for FAKE_SYS
1 parent 7a96951 commit aeb0155

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "tests/fake-sys"]
22
path = tests/fake-sys
3-
url = https://github.com/rhempel/ev3dev-lang-fake-sys.git
3+
url = https://github.com/ddemidov/ev3dev-lang-fake-sys.git

ev3dev/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def get_current_platform():
4848
"""
4949
board_info_dir = '/sys/class/board-info/'
5050

51+
if not os.path.exists(board_info_dir):
52+
return 'fake'
53+
5154
for board in os.listdir(board_info_dir):
5255
uevent_filename = os.path.join(board_info_dir, board, 'uevent')
5356

ev3dev/sensor/lego.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
raise SystemError('Must be using Python 3.4 or higher')
3030

3131
import time
32-
from ev3dev._button import ButtonBase
32+
from ev3dev.button import ButtonBase
3333
from ev3dev.sensor import Sensor
3434

3535

tests/fake-sys

0 commit comments

Comments
 (0)