Currently, if no policy.yaml file exists, ventis crashes with the following error:
TypeError: object of type 'NoneType' has no len()
Possible Fixes:
- Make initialize the policy to an empty list initially, so it does nothing instead of crashing
- Remove the len(), replace it with something better
Below is the following stack trace of the error:
File "/home/ubuntu/canyoncode/ventis/cli.py", line 339, in cmd_deploy
controller = GlobalController(config_path)
File "/home/ubuntu/canyoncode/ventis/controller/global_controller.py", line 84, in init
self._load_and_write_policies()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/ubuntu/canyoncode/ventis/controller/global_controller.py", line 208, in _load_and_write_policies
len(rules),
~~~^^^^^^^
TypeError: object of type 'NoneType' has no len()
Currently, if no policy.yaml file exists, ventis crashes with the following error:
TypeError: object of type 'NoneType' has no len()
Possible Fixes:
Below is the following stack trace of the error:
File "/home/ubuntu/canyoncode/ventis/cli.py", line 339, in cmd_deploy
controller = GlobalController(config_path)
File "/home/ubuntu/canyoncode/ventis/controller/global_controller.py", line 84, in init
self._load_and_write_policies()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/ubuntu/canyoncode/ventis/controller/global_controller.py", line 208, in _load_and_write_policies
len(rules),
~~~^^^^^^^
TypeError: object of type 'NoneType' has no len()