Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ossie/utils/bluefile/bluefile_helpers.py: hdr_to_sri does not handle dict() extended header #35

Open
btgoodwin opened this issue May 7, 2020 · 0 comments

Comments

@btgoodwin
Copy link

REDHAWK 2.2.6

The way the method is written, the extended header (ext_header) must be of list format. In the iteration over a dictionary, the value is unused and item is not in scope (this is a copy-paste error where the code for processing a list was almost used directly for the dict. The block of code can be fixed by replacing item[1] with value:

        if isinstance(ext_hdr, dict):            
            for key, value in ext_hdr.iteritems():
                try:
                    data=value
                    if isinstance(value, numpy.generic):
                        data=value.item()
                    dt = CF.DataType(key, ossie.properties.numpy_to_tc_value(data, type(value).__name__))
                    #print "DEBUG (dict) AFTER dt.value:", dt.value, dt.value.value(), type(dt.value.value())
                    kwds.append(dt)
                except:
                    continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant