diff --git a/tests/device_tests/config.py b/tests/device_tests/config.py index 38e7e437f..006aa376c 100644 --- a/tests/device_tests/config.py +++ b/tests/device_tests/config.py @@ -42,13 +42,13 @@ except: def pipe_exists(path): - import os + import os, stat try: - os.stat(path) - return True + return stat.S_ISFIFO(os.stat(path).st_mode) except: return False + if HID_ENABLED: devices = HidTransport.enumerate()