BroControl incorrectly references ok attribute of results even when None type is returned

Description

The various do_xxxx methods in bin/broctl attempt to reference the "ok" attribute of the results object returned from the BroCtl class' corresponding method. However, these methods can return the None type which has no "ok" attribute. This results in errors like this from BroControl:

{{[root@system spool]# /usr/local/bro/bin/broctl install
error: Unable to do xyz in plugin
Error: 'NoneType' object has no attribute 'ok'}}

I discovered this when returning False from the cmd_install_pre() method of my custom BroControl plugin.

Environment

None

Activity

Show:
Daniel Thayer
April 6, 2016, 10:41 PM

In branch "topic/dnthayer/ticket1564" in the broctl git repo, I've fixed several
commands so that the return value data type is consistent.

Assignee

Justin Azoff

Reporter

Scott Knick

Labels

None

External issue ID

None

Components

Fix versions

Priority

Low
Configure