StackStorm / st2sdk

This repository contains different utilities and tools which help with the StackStorm integration pack development.
Apache License 2.0
10 stars 11 forks source link

Empty parameters list passes 'make lint', fails on import #9

Open LindsayHill opened 7 years ago

LindsayHill commented 7 years ago

If I have an action.yaml file like this:

name: action
runner_type: run-python
description: List Some Stuff
enabled: true
entry_point: action_script.py
parameters:

Then it will pass make lint, but it will fail when registering with an error similar to this:

Traceback (most recent call last):
  File "/usr/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 354, in main
    register_content()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 326, in register_content
    register_actions()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/content/bootstrap.py", line 195, in register_actions
    raise e
AttributeError: 'NoneType' object has no attribute 'iteritems'

It would be better if this error was detected when running make lint, rather than at registration time.