RedHatInsights / insights-core

Insights Core is a data collection and processing framework used by Red Hat Insights
https://cloud.redhat.com/insights
Apache License 2.0
149 stars 174 forks source link

YAMLParser does not handle list-like YAML texts #2060

Closed fcami closed 5 years ago

fcami commented 5 years ago

If a list-like YAML text is parsed a backtrace occurs:

insights/core/__init__.py:87: in __init__
    self._handle_content(context)
insights/core/__init__.py:90: in _handle_content
    self.parse_content(context.content)
insights/core/__init__.py:700: in parse_content
    self.doc = from_dict(self.data)
insights/parsr/query/__init__.py:476: in from_dict
    return Entry(children=inner(orig))
(...)
>       for k, v in d.items():
E       AttributeError: 'list' object has no attribute 'items'
miclark commented 5 years ago

Assigning to @fcami since he seems to be working the issue.

bfahr commented 5 years ago

Fixed by #2061