Skip to content
Permalink
Browse files

show a better error when configuring invalid display

  • Loading branch information...
jabdoa2 committed Jul 21, 2019
1 parent 431ee46 commit 2bbc750cfc27df04b83f57680fe27003484b1ef1
Showing with 3 additions and 2 deletions.
  1. +3 −2 mpf/platforms/lisy/lisy.py
@@ -148,8 +148,9 @@ def initialize(self):
# display info for display
display_info = yield from (self.platform.send_byte_and_read_response(
LisyDefines.InfoGetDisplayDetails, bytearray([self.number]), 2))
if 0 > display_info[1] > 6:
raise AssertionError("Invalid display type {} in hardware".format(self._type_of_display))
if 1 > display_info[1] > 6:
raise AssertionError("Invalid display type {} reported by hardware for display {}".format(
self._type_of_display, self.number))

self._length_of_display = int(display_info[0])
self._type_of_display = display_info[1]

0 comments on commit 2bbc750

Please sign in to comment.
You can’t perform that action at this time.