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
  • Loading branch information
ArunSaravananBalachandran authored Nov 11, 2021
1 parent b8eb9f2 commit 935923b
Showing 1 changed file with 8 additions and 6 deletions.
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 935923b

Please sign in to comment.