[BFN] Convert platform modules to python 3 (#6347)
Fix syntax errors during xcvrd start with Python 3 daemons
This commit is contained in:
parent
d6b92da643
commit
9006b961b7
@ -46,7 +46,7 @@ class SfpUtil(SfpUtilBase):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def port_to_eeprom_mapping(self):
|
def port_to_eeprom_mapping(self):
|
||||||
print "dependency on sysfs has been removed"
|
print("dependency on sysfs has been removed")
|
||||||
raise Exception()
|
raise Exception()
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -88,8 +88,8 @@ class SfpUtil(SfpUtilBase):
|
|||||||
try:
|
try:
|
||||||
presence = thrift_try(qsfp_presence_get)
|
presence = thrift_try(qsfp_presence_get)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print e.__doc__
|
print( e.__doc__)
|
||||||
print e.message
|
print(e.message)
|
||||||
|
|
||||||
return presence
|
return presence
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ class SfpUtil(SfpUtilBase):
|
|||||||
elif timeout > 0:
|
elif timeout > 0:
|
||||||
timeout = timeout / float(1000) # Convert to secs
|
timeout = timeout / float(1000) # Convert to secs
|
||||||
else:
|
else:
|
||||||
print "get_transceiver_change_event:Invalid timeout value", timeout
|
print("get_transceiver_change_event:Invalid timeout value", timeout)
|
||||||
return False, {}
|
return False, {}
|
||||||
|
|
||||||
while forever or timeout > 0:
|
while forever or timeout > 0:
|
||||||
|
Reference in New Issue
Block a user