Dell S6100: Watchdog - Fix Python3 incompatibility (#6734)
To make watchdog.arm() method python3 compatible in DellEMC S6100.
This commit is contained in:
parent
7ea0d9e27a
commit
8ec747f2eb
@ -151,9 +151,9 @@ class Watchdog(WatchdogBase):
|
|||||||
if self.is_armed():
|
if self.is_armed():
|
||||||
gpio_val = self._read_gpio_file(gpio)
|
gpio_val = self._read_gpio_file(gpio)
|
||||||
high_val = gpio_val | (1 << 15)
|
high_val = gpio_val | (1 << 15)
|
||||||
if self._write_gpio_file(gpio, hex(high_val)) != -1:
|
if self._write_gpio_file(gpio, hex(high_val).encode('utf-8')) != -1:
|
||||||
low_val = high_val & 0xFFFF7FFF
|
low_val = high_val & 0xFFFF7FFF
|
||||||
if self._write_gpio_file(gpio, hex(low_val)) != -1:
|
if self._write_gpio_file(gpio, hex(low_val).encode('utf-8')) != -1:
|
||||||
self.armed_time = self._get_time()
|
self.armed_time = self._get_time()
|
||||||
self.timeout = seconds
|
self.timeout = seconds
|
||||||
return seconds
|
return seconds
|
||||||
|
Loading…
Reference in New Issue
Block a user