|
|
|
@ -238,7 +238,7 @@ class OSXDefaults(object):
|
|
|
|
|
value = "TRUE"
|
|
|
|
|
else:
|
|
|
|
|
value = "FALSE"
|
|
|
|
|
elif type(self.value) is int or type(self.value) is float:
|
|
|
|
|
elif isinstance(self.value, (int, float)):
|
|
|
|
|
value = str(self.value)
|
|
|
|
|
elif self.array_add and self.current_value is not None:
|
|
|
|
|
value = list(set(self.value) - set(self.current_value))
|
|
|
|
@ -285,7 +285,7 @@ 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 type(self.current_value) is not type(self.value):
|
|
|
|
|
if self.current_value is not None and not isinstance(self.current_value, type(self.value)):
|
|
|
|
|
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
|
|
|
|
|