truenas / py-SMART

Wrapper for smartctl (smartmontools)
GNU Lesser General Public License v2.1
79 stars 35 forks source link

Allow for empty serial. #69

Closed Heidistein closed 1 year ago

Heidistein commented 1 year ago

I have several NVME drives reporting an empty 'Serial Number:'. The line is there, but with no data. This commit catches that error. I was in doubt if it might have been nicer to check the length returned by the split(':').

ralequi commented 1 year ago

Seems like an easy fix.

Thanks for your contrib!