settings: patch to make python 3.7 happy
This commit is contained in:
parent
e9297cf8d8
commit
d1d3d71091
|
@ -349,7 +349,7 @@ class Backlight2Duration(_Setting):
|
||||||
|
|
||||||
def write(self, device, data_bytes):
|
def write(self, device, data_bytes):
|
||||||
backlight = device.backlight
|
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):
|
if new_duration != getattr(backlight, self.field):
|
||||||
setattr(backlight, self.field, new_duration)
|
setattr(backlight, self.field, new_duration)
|
||||||
backlight.write()
|
backlight.write()
|
||||||
|
|
Loading…
Reference in New Issue