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):
595
595
if element is None :
596
596
continue
597
597
598
- if not isinstance (element , str ) and not isinstance (element , Number ) \
599
- and not isinstance (element , bool ):
598
+ if not _check_element_type (element ):
600
599
_LOGGER .warning ('%s: Property %s is of invalid type. Setting value to None' , source , element )
601
600
element = None
602
601
@@ -616,6 +615,13 @@ def valid_properties(properties, source):
616
615
' when processed' , source )
617
616
return True , valid_properties if len (valid_properties ) else None , size
618
617
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
+
619
625
def validate_pluggable_adapter (config ):
620
626
"""
621
627
Check if pluggable adapter contains the expected method signature
You can’t perform that action at this time.
0 commit comments