Skip to content

Commit

Permalink
DellEMC: Z9332f - Fix error message during Chassis initialization (so…
Browse files Browse the repository at this point in the history
…nic-net#9218)

Signed-off-by: Ze Gan <ganze718@gmail.com>
  • Loading branch information
ArunSaravananBalachandran authored and Pterosaur committed Nov 29, 2021
1 parent b8eb9f2 commit bd3aa96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile.work
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ SONIC_BUILD_INSTRUCTION := make \
NO_PROXY=$(no_proxy) \
SONIC_INCLUDE_SYSTEM_TELEMETRY=$(INCLUDE_SYSTEM_TELEMETRY) \
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
INCLUDE_MACSEC=$(INCLUDE_MACSEC) \
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \
TELEMETRY_WRITABLE=$(TELEMETRY_WRITABLE) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ def get_cpld2_version():
def get_ssd_version():
val = 'NA'
try:
ssd_ver = subprocess.check_output(['ssdutil','-v'], text=True)
except Exception:
return val
ssd_ver = subprocess.check_output(['ssdutil', '-v'],
stderr=subprocess.STDOUT, text=True)
except (FileNotFoundError, subprocess.CalledProcessError):
pass
else:
version = re.search(r'Firmware\s*:(.*)',ssd_ver)
if version:
Expand All @@ -63,9 +64,10 @@ def get_ssd_version():
def get_pciephy_version():
val = 'NA'
try:
pcie_ver = subprocess.check_output('bcmcmd "pciephy fw version"', shell=True, text=True)
except Exception:
return val
pcie_ver = subprocess.check_output(['bcmcmd', 'pciephy fw version'],
stderr=subprocess.STDOUT, text=True)
except (FileNotFoundError, subprocess.CalledProcessError):
pass
else:
version = re.search(r'PCIe FW loader version:\s(.*)', pcie_ver)
if version:
Expand Down

0 comments on commit bd3aa96

Please sign in to comment.