Replaced has_key() with in op

This commit is contained in:
Domen Tabernik 2020-07-28 15:02:39 +02:00 committed by GitHub
parent 055ab5f833
commit e9535365d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -123,10 +123,10 @@ def get_fan(config, fan, in_rpm=False):
if type(fan) == list:
return_list = {}
for f in fan:
if fan_status_list.has_key(f):
if f in fan_status_list:
return_list[f] = convert_fn(fan_status_list[f])
return return_list
elif fan_status_list.has_key(fan):
elif fan in fan_status_list:
return convert_fn(fan_status_list[fan])
else:
return False