mirror of
https://opendev.org/x/pyghmi
synced 2026-01-12 03:02:33 +00:00
Use str as key instead of float to avoid computing problems
Change-Id: I9084e627e1923b27ceb3c5566306782f5ee45280
This commit is contained in:
@@ -37,8 +37,7 @@ def get_oem_handler(oemid, ipmicmd, *args):
|
||||
# first try to find with composite key manufacturer_id.product_id,
|
||||
# if found return directly
|
||||
# then try to find with manufacturer_id
|
||||
item = float('.'.join([str(oemid['manufacturer_id']),
|
||||
str(oemid['product_id'])]))
|
||||
item = '{}.{}'.format(oemid['manufacturer_id'], oemid['product_id'])
|
||||
if item in oemmap:
|
||||
return (oemmap[item].OEMHandler(oemid, ipmicmd, *args), True)
|
||||
return (oemmap[oemid['manufacturer_id']].OEMHandler(oemid,
|
||||
|
||||
Reference in New Issue
Block a user