WLAN-Pi / wlanpi-hwtest

hwtest drives a suite of tests to determine diagnostic health for WLAN Pi Pro hardware.
Other
1 stars 0 forks source link

handle device object creation scope #48

Closed joshschmelzle closed 2 years ago

joshschmelzle commented 2 years ago

add better error handling for when wlanpi-fpms is already using the OLED.

wlanpi@wlanpi-087:~ $ sudo hwtest --verbose
2022-02-03 14:36:36,963 [INFO] verify_vl805_firmware: vl805_000138a1.bin EEPROM data verified
Traceback (most recent call last):
  File "/usr/sbin/hwtest", line 8, in <module>
    sys.exit(main())
  File "/opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/__main__.py", line 57, in main
    hwtest.start()
  File "/opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/hwtest.py", line 46, in start
    init_oled_luma_terminal()
  File "/opt/wlanpi-hwtest/lib/python3.9/site-packages/hwtest/oled.py", line 190, in init_oled_luma_terminal
    cfg.TERMINAL = terminal(
  File "/opt/wlanpi-hwtest/lib/python3.9/site-packages/luma/core/virtual.py", line 231, in __init__
    self.width = device.width // self._cw
AttributeError: 'NoneType' object has no attribute 'width'
joshschmelzle commented 2 years ago

Apparently I broke something in v1.0.11 and I did not catch it until now. bf500f11b5a7737c68681734990cb4b8ecac6d90 fixes this and the issue title has nothing to do with it.