Skip to content

Commit

Permalink
Dell S6100: Watchdog - Fix Python3 incompatibility (#6734)
Browse files Browse the repository at this point in the history
To make watchdog.arm() method python3 compatible in DellEMC S6100.
  • Loading branch information
ArunSaravananBalachandran authored Feb 10, 2021
1 parent 7ea0d9e commit 8ec747f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ def arm(self, seconds):
if self.is_armed():
gpio_val = self._read_gpio_file(gpio)
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
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.timeout = seconds
return seconds
Expand Down

0 comments on commit 8ec747f

Please sign in to comment.