From f7bb635be87d3d7903e26a85ce7385ff7a5798d5 Mon Sep 17 00:00:00 2001 From: Myron Sosyak <49795530+msosyak@users.noreply.github.com> Date: Tue, 5 Jan 2021 01:00:48 +0200 Subject: [PATCH] [BFN] Convert platform modules to python 3 (#6347) Fix syntax errors during xcvrd start with Python 3 daemons --- .../sonic_platform/sfp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py index dc57dbcd90..cb8931998e 100644 --- a/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py +++ b/platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py @@ -46,7 +46,7 @@ class SfpUtil(SfpUtilBase): @property def port_to_eeprom_mapping(self): - print "dependency on sysfs has been removed" + print("dependency on sysfs has been removed") raise Exception() def __init__(self): @@ -88,8 +88,8 @@ class SfpUtil(SfpUtilBase): try: presence = thrift_try(qsfp_presence_get) except Exception as e: - print e.__doc__ - print e.message + print( e.__doc__) + print(e.message) return presence @@ -167,7 +167,7 @@ class SfpUtil(SfpUtilBase): elif timeout > 0: timeout = timeout / float(1000) # Convert to secs else: - print "get_transceiver_change_event:Invalid timeout value", timeout + print("get_transceiver_change_event:Invalid timeout value", timeout) return False, {} while forever or timeout > 0: