@@ -74,10 +74,10 @@ def merge_model_and_existing_lists(model_list, existing_list, string_list_separa
7474 result = model_list
7575 elif model_list is None or len (model_list ) == 0 :
7676 result = existing_list
77- if type (model_list ) is str and type (existing_list ) is not str :
77+ if isinstance (model_list , basestring ) and not isinstance (existing_list , basestring ) :
7878 result = string_list_separator_char .join (existing_list )
7979 else :
80- model_list_is_string = type (model_list ) is str
80+ model_list_is_string = isinstance (model_list , basestring )
8181 model_set = _create_set (model_list , string_list_separator_char , 'WLSDPLY-08000' )
8282 existing_set = _create_set (existing_list , string_list_separator_char , 'WLSDPLY-08001' )
8383
@@ -107,7 +107,7 @@ def merge_model_and_existing_properties(model_props, existing_props, string_prop
107107 result = model_props
108108 elif model_props is None or len (model_props ) == 0 :
109109 result = existing_props
110- if type (model_props ) is str and type (existing_props ) is not str :
110+ if isinstance (model_props , basestring ) and isinstance (existing_props , basestring ) :
111111 result = _properties_to_string (existing_props , string_props_separator_char )
112112 else :
113113 model_props_is_string = False
@@ -517,7 +517,7 @@ def convert_boolean(value):
517517 result = True
518518 elif value == 0 :
519519 result = False
520- elif type (value ) is str :
520+ elif isinstance (value , basestring ) :
521521 if value .lower () == 'true' :
522522 result = True
523523 elif value .lower () == 'false' :
@@ -844,7 +844,7 @@ def _get_path_separator(value):
844844 _logger .entering (value , class_name = _class_name , method_name = _method_name )
845845
846846 result = File .pathSeparator
847- if type (value ) is str and len (value ) > 0 :
847+ if isinstance (value , basestring ) and len (value ) > 0 :
848848 # If the value has a windows separator or a single directory that starts with a drive letter
849849 if ';' in value or _windows_path_regex .match (value ):
850850 result = ';'
@@ -972,7 +972,7 @@ def _properties_to_string(props, string_props_separator_char):
972972 _logger .entering (props , string_props_separator_char , class_name = _class_name , method_name = _method_name )
973973 if props is None :
974974 result = ''
975- elif type (props ) is str :
975+ elif isinstance (props , basestring ) :
976976 result = props
977977 else :
978978 result = ''
0 commit comments