File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -595,8 +595,7 @@ def valid_properties(properties, source):
595595 if element is None :
596596 continue
597597
598- if not isinstance (element , str ) and not isinstance (element , Number ) \
599- and not isinstance (element , bool ):
598+ if not _check_element_type (element ):
600599 _LOGGER .warning ('%s: Property %s is of invalid type. Setting value to None' , source , element )
601600 element = None
602601
@@ -616,6 +615,13 @@ def valid_properties(properties, source):
616615 ' when processed' , source )
617616 return True , valid_properties if len (valid_properties ) else None , size
618617
618+ def _check_element_type (element ):
619+ if not isinstance (element , str ) and not isinstance (element , Number ) \
620+ and not isinstance (element , bool ):
621+ return False
622+
623+ return True
624+
619625def validate_pluggable_adapter (config ):
620626 """
621627 Check if pluggable adapter contains the expected method signature
You can’t perform that action at this time.
0 commit comments