Skip to content

Commit

Permalink
Fix lgtm
Browse files Browse the repository at this point in the history
Signed-off-by: maipbui <maibui@microsoft.com>
  • Loading branch information
maipbui committed Aug 29, 2022
1 parent a455cae commit 3702046
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SfpUtil(SfpUtilBase):
def __init__(self):
subprocess.run(split("modprobe i2c-dev"))
if not os.path.exists("/sys/bus/i2c/devices/0-0050"):
subprocess.run(split("echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-0/new_device")
subprocess.run(split("echo optoe2 0x50 > /sys/bus/i2c/devices/i2c-0/new_device"))

eeprom_path = '/sys/bus/i2c/devices/0-0050/eeprom'
# for x in range(self.port _start, self.port_end +1):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self):
#print port_eeprom_path
if not os.path.exists(port_eeprom_path):
bus_dev_path = bus_path.format(self.port_to_i2c_mapping[x])
subprocess.run("echo optoe2 0x50 > " + bus_dev_path + "/new_device"))
subprocess.run(split("echo optoe2 0x50 > " + bus_dev_path + "/new_device"))
self.port_to_eeprom_mapping[x] = port_eeprom_path
self._port_to_eeprom_mapping[x] = port_eeprom_path
SfpUtilBase.__init__(self)
Expand Down

0 comments on commit 3702046

Please sign in to comment.