Skip to content

Commit f7bb635

Browse files
msosyaklguohan
authored andcommitted
[BFN] Convert platform modules to python 3 (#6347)
Fix syntax errors during xcvrd start with Python 3 daemons
1 parent 08ab275 commit f7bb635

File tree

1 file changed

+4
-4
lines changed
  • platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform

1 file changed

+4
-4
lines changed

platform/barefoot/sonic-platform-modules-bfn-montara/sonic_platform/sfp.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def qsfp_ports(self):
4646

4747
@property
4848
def port_to_eeprom_mapping(self):
49-
print "dependency on sysfs has been removed"
49+
print("dependency on sysfs has been removed")
5050
raise Exception()
5151

5252
def __init__(self):
@@ -88,8 +88,8 @@ def qsfp_presence_get(client):
8888
try:
8989
presence = thrift_try(qsfp_presence_get)
9090
except Exception as e:
91-
print e.__doc__
92-
print e.message
91+
print( e.__doc__)
92+
print(e.message)
9393

9494
return presence
9595

@@ -167,7 +167,7 @@ def get_transceiver_change_event(self, timeout=0):
167167
elif timeout > 0:
168168
timeout = timeout / float(1000) # Convert to secs
169169
else:
170-
print "get_transceiver_change_event:Invalid timeout value", timeout
170+
print("get_transceiver_change_event:Invalid timeout value", timeout)
171171
return False, {}
172172

173173
while forever or timeout > 0:

0 commit comments

Comments
 (0)