mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Refactor usage of type() (#3412)
Addresses https://github.com/ansible/ansible/issues/18440
This commit is contained in:
@@ -285,7 +285,8 @@ class OSXDefaults(object):
|
||||
return True
|
||||
|
||||
# There is a type mismatch! Given type does not match the type in defaults
|
||||
if self.current_value is not None and not isinstance(self.current_value, type(self.value)):
|
||||
value_type = type(self.value)
|
||||
if self.current_value is not None and not isinstance(self.current_value, value_type):
|
||||
raise OSXDefaultsException("Type mismatch. Type in defaults: " + type(self.current_value).__name__)
|
||||
|
||||
# Current value matches the given value. Nothing need to be done. Arrays need extra care
|
||||
|
||||
Reference in New Issue
Block a user