Skip to content

Commit 36fd97d

Browse files
author
Thomas Goodwin
committed
Bugfix for handling simpleseq properties
1 parent 79bcd2e commit 36fd97d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

rest/helper.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,18 @@ def _corba_properties(properties):
5353
def _property_set(properties):
5454
prop_dict = []
5555
for prop in properties:
56+
# BugFix: write-only props cannot be queried, here's a way to feed
57+
# a non-destructive value in place.
58+
val = None if ('writeonly' == prop.mode or 'message' in prop.kinds) else prop.queryValue()
59+
5660
if prop.type not in ['struct', 'structSeq']:
57-
if prop.type == 'sequence':
58-
prop_type = 'simpleSeq' # FIXME: Maybe don't rename??
61+
if type(val) == list:
62+
prop_type = 'simpleSeq'
5963
else:
6064
prop_type = 'simple'
6165
else:
6266
prop_type = prop.type
6367

64-
# BugFix: write-only props cannot be queried, here's a way to feed
65-
# a non-destructive value in place.
66-
val = None if ('writeonly' == prop.mode or 'message' in prop.kinds) else prop.queryValue()
6768
prop_json = {
6869
'id': prop.id,
6970
'name': prop.clean_name,

0 commit comments

Comments
 (0)