Skip to content

Commit

Permalink
[sonic_sfp] fix syntax error in sfputilbase._read_eeprom_specific_byt…
Browse files Browse the repository at this point in the history
…es (#58)
  • Loading branch information
stephenxs authored and jleveque committed Sep 5, 2019
1 parent b972e84 commit ac7fde6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sonic_sfp/sfputilbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ def _read_eeprom_specific_bytes(self, sysfsfile_eeprom, offset, num_bytes):
sysfsfile_eeprom.seek(offset)
raw = sysfsfile_eeprom.read(num_bytes)
except IOError:
print("Error: reading sysfs file %s" % sysfs_sfp_i2c_client_eeprom_path)
if sysfsfile_eeprom is not None:
print("Error: reading sysfs file %s" % sysfsfile_eeprom.name)
else:
print("Error: reading sysfs, file doesn't exist")
return None

try:
Expand Down

0 comments on commit ac7fde6

Please sign in to comment.