handle more vendors, specificly for hdd

This commit is contained in:
Solvik Blum 2019-09-05 14:02:26 +02:00
parent 5435642f2c
commit 93bef02a6c
No known key found for this signature in database
GPG key ID: CC12B3DC262B6C47

View file

@ -9,13 +9,20 @@ def is_tool(name):
def get_vendor(name):
vendors = {
'ST': 'Seagate',
'Crucial': 'Crucial',
'Micron': 'Micron',
'Intel': 'Intel',
'Samsung': 'Samsung',
'CRUCIAL': 'Crucial',
'MICRON': 'Micron',
'INTEL': 'Intel',
'SAMSUNG': 'Samsung',
'EH0': 'HP',
'HGST': 'HGST',
'HUH': 'HGST',
'MB': 'Toshiba',
'MC': 'Toshiba',
'MD': 'Toshiba',
'MG': 'Toshiba',
'WD': 'WDC'
}
for key, value in vendors.items():
if name.startswith(key):
if name.upper().startswith(key):
return value
return name