Update diagnostics/os_diagnostics.py

This commit is contained in:
2026-03-11 01:03:44 +00:00
parent 94b9b64ef3
commit 07141a9c35

View File

@@ -5,7 +5,7 @@ class OSDiagnostics:
self.motorclass = motorclass self.motorclass = motorclass
self.successfultests = 0 self.successfultests = 0
self.failedtests = {} self.failedtests = {}
def testenodev: def testenodev(self):
try: try:
# Try to initialize a motor on an empty port (Port.A) # Try to initialize a motor on an empty port (Port.A)
print("Starting Test 6/9: ENODEV - Device Not Found Error") print("Starting Test 6/9: ENODEV - Device Not Found Error")
@@ -23,6 +23,6 @@ class OSDiagnostics:
else: else:
print(f"Another error occurred with code: {ex.errno}.\nCompleted Test 6/9: ENODEV - FAILED") print(f"Another error occurred with code: {ex.errno}.\nCompleted Test 6/9: ENODEV - FAILED")
self.failedtests["ENODEV"] = ex.errno self.failedtests["ENODEV"] = ex.errno
def print_results: def print_results(self):
for key, value in self.failedtests(): for key, value in self.failedtests():
print(f"{key}: {value}") print(f"{key}: {value}")