Skip to content

Commit

Permalink
Check for None in NvmeSelfTest to avoid format error in __repr__ method
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasCJL committed Oct 17, 2023
1 parent cf9036d commit 13c1b2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pySMART/interface/nvme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ def __repr__(self):
self.description,
self.status,
self.powerOnHours,
self.failingLBA,
self.nsid,
self.seg,
self.sct,
self.code
self.failingLBA if self.failingLBA is not None else '-',
self.nsid if self.nsid is not None else '-',
self.seg if self.seg is not None else '-',
self.sct if self.sct is not None else '-',
self.code if self.code is not None else '-'
))

def __getstate__(self, all_info=True):
Expand Down

0 comments on commit 13c1b2c

Please sign in to comment.