settings: patch to make python 3.7 happy

This commit is contained in:
Peter F. Patel-Schneider 2024-03-23 09:59:35 -04:00
parent e9297cf8d8
commit d1d3d71091
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class Backlight2Duration(_Setting):
def write(self, device, data_bytes):
backlight = device.backlight
new_duration = (int.from_bytes(data_bytes) + 4) // 5 # use ceiling in 5-second units
new_duration = (int.from_bytes(data_bytes, byteorder="big") + 4) // 5 # use ceiling in 5-second units
if new_duration != getattr(backlight, self.field):
setattr(backlight, self.field, new_duration)
backlight.write()