Skip to content

Commit

Permalink
Changed per review
Browse files Browse the repository at this point in the history
  • Loading branch information
assrinivasan committed Nov 25, 2024
1 parent 5147ad0 commit 9bcb0b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions sonic_platform_base/sonic_storage/ssd.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,8 @@ def fetch_parse_info(self, diskdev):
if self.model:
vendor = self._parse_vendor()
if vendor:

self.fetch_vendor_ssd_info(diskdev, vendor)
try:
self.fetch_vendor_ssd_info(diskdev, vendor)
self.parse_vendor_ssd_info(vendor)
except Exception as ex:
self.log.log_error("{}".format(str(ex)))
Expand Down Expand Up @@ -375,10 +374,7 @@ def parse_transcend_info(self):
self.temperature = temp_raw.split()[-1]

def fetch_vendor_ssd_info(self, diskdev, model):
try:
self.vendor_ssd_info = self._execute_shell(self.vendor_ssd_utility[model]["utility"].format(diskdev))
except:
self.log.log_info("Error fetching vendor info. Falling back to generic info.")
self.vendor_ssd_info = self._execute_shell(self.vendor_ssd_utility[model]["utility"].format(diskdev))

def parse_vendor_ssd_info(self, model):
self.vendor_ssd_utility[model]["parser"]()
Expand Down

0 comments on commit 9bcb0b9

Please sign in to comment.