[BFN] Convert platform modules to python 3 (#6347)

Fix syntax errors during xcvrd start with Python 3 daemons
This commit is contained in:
Myron Sosyak 2021-01-05 01:00:48 +02:00 committed by GitHub
parent d6b92da643
commit 9006b961b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: