From 8ec747f2ebbae6e2b6a38adb659167b5ce827018 Mon Sep 17 00:00:00 2001 From: Arun Saravanan Balachandran <52521751+ArunSaravananBalachandran@users.noreply.github.com> Date: Wed, 10 Feb 2021 14:13:24 +0000 Subject: [PATCH] Dell S6100: Watchdog - Fix Python3 incompatibility (#6734) To make watchdog.arm() method python3 compatible in DellEMC S6100. --- .../s6100/sonic_platform/watchdog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/watchdog.py b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/watchdog.py index c6d5e6e2e9..0e5e102b7b 100644 --- a/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/watchdog.py +++ b/platform/broadcom/sonic-platform-modules-dell/s6100/sonic_platform/watchdog.py @@ -151,9 +151,9 @@ class Watchdog(WatchdogBase): 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