Skip to content

Commit a2d7757

Browse files
pphuchartiantianlv
authored andcommitted
[device/celestica] Silverstone format sfputil codes
1 parent 2e3ce7e commit a2d7757

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • device/celestica/x86_64-cel_silverstone-r0/plugins

device/celestica/x86_64-cel_silverstone-r0/plugins/sfputil.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def __init__(self):
7373
SfpUtilBase.__init__(self)
7474

7575
def get_presence(self, port_num):
76-
7776
# Check for invalid port_num
7877
if port_num not in range(self.port_start, self.port_end + 1):
7978
return False
@@ -105,7 +104,7 @@ def get_low_power_mode(self, port_num):
105104

106105
try:
107106
port_name = self.get_port_name(port_num)
108-
reg_file = open("/".join([self.PORT_INFO_PATH,
107+
reg_file = open("/".join([self.PORT_INFO_PATH,
109108
port_name, "qsfp_lpmode"]))
110109
except IOError as e:
111110
print "Error: unable to open file: %s" % str(e)
@@ -127,8 +126,8 @@ def set_low_power_mode(self, port_num, lpmode):
127126

128127
try:
129128
port_name = self.get_port_name(port_num)
130-
reg_file = open("/".join([self.PORT_INFO_PATH,
131-
port_name, "qsfp_lpmode"]), "r+")
129+
reg_file = open("/".join([self.PORT_INFO_PATH,
130+
port_name, "qsfp_lpmode"]), "r+")
132131
except IOError as e:
133132
print "Error: unable to open file: %s" % str(e)
134133
return False
@@ -148,8 +147,8 @@ def reset(self, port_num):
148147

149148
try:
150149
port_name = self.get_port_name(port_num)
151-
reg_file = open("/".join([self.PORT_INFO_PATH,
152-
port_name, "qsfp_reset"]), "w")
150+
reg_file = open("/".join([self.PORT_INFO_PATH,
151+
port_name, "qsfp_reset"]), "w")
153152
except IOError as e:
154153
print "Error: unable to open file: %s" % str(e)
155154
return False
@@ -181,4 +180,3 @@ def get_transceiver_change_event(self, timeout=0):
181180
TBD
182181
"""
183182
return NotImplementedError
184-

0 commit comments

Comments
 (0)