File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -223,9 +223,27 @@ def __any_simple_seq(corba_any):
223223 'value' : []
224224 }
225225 for a in corba_any .value .value ():
226- if ret ['type' ] == '' :
227- ret ['type' ] = PropertyHelper .__corba_to_cf_type (a .value ._t )
228- ret ['value' ].append (a .value .value ())
226+ if hasattr (a , 'value' ):
227+ # The item in the sequence is a CORBA type
228+ if ret ['type' ] == '' :
229+ ret ['type' ] = PropertyHelper .__corba_to_cf_type (a .value ._t )
230+ ret ['value' ].append (a .value .value ())
231+ else :
232+ # The item in the sequence is a Python type
233+ if ret ['type' ] == '' :
234+ # Convert to CF type
235+ aType = str (type (a ))
236+ if 'str' in aType :
237+ ret ['type' ] = 'string'
238+ elif ('int' in aType ) or ('long' in aType ):
239+ ret ['type' ] = 'long'
240+ elif 'float' in aType :
241+ ret ['type' ] = 'double'
242+ elif 'bool' in aType :
243+ ret ['type' ] = 'boolean'
244+ else :
245+ ret ['type' ] = aType
246+ ret ['value' ].append (a )
229247 return ret
230248
231249 @staticmethod
You can’t perform that action at this time.
0 commit comments