DellEMC: Z9332f - Fix error message during Chassis initialization (#9218)

This commit is contained in:
Arun Saravanan Balachandran 2021-11-11 11:10:34 +05:30 committed by GitHub
parent b8eb9f2769
commit 935923b805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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:
@ -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: