Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions rest/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,27 @@ def __any_simple_seq(corba_any):
'value': []
}
for a in corba_any.value.value():
if ret['type'] == '':
ret['type'] = PropertyHelper.__corba_to_cf_type(a.value._t)
ret['value'].append(a.value.value())
if hasattr(a, 'value'):
# The item in the sequence is a CORBA type
if ret['type'] == '':
ret['type'] = PropertyHelper.__corba_to_cf_type(a.value._t)
ret['value'].append(a.value.value())
else:
# The item in the sequence is a Python type
if ret['type'] == '':
# Convert to CF type
aType = str(type(a))
if 'str' in aType:
ret['type'] = 'string'
elif ('int' in aType) or ('long' in aType):
ret['type'] = 'long'
elif 'float' in aType:
ret['type'] = 'double'
elif 'bool' in aType:
ret['type'] = 'boolean'
else:
ret['type'] = aType
ret['value'].append(a)
return ret

@staticmethod
Expand Down