Skip to content

Empty array breaks varstack #14

Description

@mat813

I have this:

foo: []

And it breaks with:

Traceback (most recent call last):
  File "/usr/local/bin/varstack", line 33, in <module>
    res = vs.evaluate(vardata)
  File "/usr/local/lib/python2.7/site-packages/varstack/__init__.py", line 59, in evaluate
    return self.__cleanupData(rawdata)
  File "/usr/local/lib/python2.7/site-packages/varstack/__init__.py", line 103, in __cleanupData
    newdata[key] = self.__cleanupData(data[key])
  File "/usr/local/lib/python2.7/site-packages/varstack/__init__.py", line 103, in __cleanupData
    newdata[key] = self.__cleanupData(data[key])
  File "/usr/local/lib/python2.7/site-packages/varstack/__init__.py", line 105, in __cleanupData
    if type(data[0]) == dict and '__combine' in data[0]:
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions