[eeprom] Fix eeprom.py (#2345)

Signed-off-by: Mykola Faryma <mykolaf@mellanox.com>
This commit is contained in:
Mykola F
2018-12-04 17:42:03 +02:00
committed by GitHub
parent e9b442b85e
commit 7f3f09d28a

View File

@@ -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")