mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-11-27 03:33:52 +00:00
[eeprom] Fix eeprom.py (#2345)
Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
This commit is contained in:
@@ -17,6 +17,7 @@ try:
|
|||||||
import warnings
|
import warnings
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import syslog
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from sonic_eeprom import eeprom_base
|
from sonic_eeprom import eeprom_base
|
||||||
from sonic_eeprom import eeprom_tlvinfo
|
from sonic_eeprom import eeprom_tlvinfo
|
||||||
@@ -45,7 +46,7 @@ class board(eeprom_tlvinfo.TlvInfoDecoder):
|
|||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
if not (os.path.islink(EEPROM_SYMLINK) or os.isfile(CACHE_FILE)):
|
if not (os.path.exists(EEPROM_SYMLINK) or os.path.isfile(CACHE_FILE)):
|
||||||
log_error("Nowhere to read syseeprom from! No symlink or cache file found")
|
log_error("Nowhere to read syseeprom from! No symlink or cache file found")
|
||||||
raise RuntimeError("No syseeprom symlink or cache file found")
|
raise RuntimeError("No syseeprom symlink or cache file found")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user