We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb76ce3 commit e4c5e6fCopy full SHA for e4c5e6f
ev3dev/core.py
@@ -57,6 +57,10 @@
57
58
# -----------------------------------------------------------------------------
59
def list_device_names(class_path, name_pattern, **kwargs):
60
+
61
+ if not os.path.isdir(class_path):
62
+ return
63
64
"""
65
This is a generator function that lists names of all devices matching the
66
provided parameters.
tests/api_tests.py
@@ -36,6 +36,9 @@ def test_device(self):
36
d = ev3.Device('lego-sensor', 'sensor*')
37
self.assertTrue(d.connected)
38
39
+ d = ev3.Device('this-does-not-exist')
40
+ self.assertFalse(d.connected)
41
42
def test_medium_motor(self):
43
def dummy(self):
44
pass
0 commit comments