Running otto with no arguments results in an uncaught exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Otto |
New
|
Undecided
|
Unassigned |
Bug Description
running otto without any arguments leads to an uncaught exception:
<snip>
$ ./otto/bin/otto
usage: otto [-h] [-d] {create,
Manages containers to run automated UI tests with LXC.
This script must be run with root privileges without any user logged into a
graphical session as the display manager will be shutdown.
Physical devices (video, sound and input) are shared between the host and the
guest, and any action on one side will have effects on the other side, so it is
recommended to not touch the device under test while the test is running.
optional arguments:
-h, --help show this help message and exit
-d, --debug enable debug mode
commands:
{create,
create Create a new container
destroy Destroy a container
start Start a container
stop Stop a container
help Get help on one of those commands
Traceback (most recent call last):
File "./otto/bin/otto", line 46, in <module>
cmd = commands.Commands()
File "/home/
self.
File "/home/
self.args.name, create = self.args.
AttributeError: 'Namespace' object has no attribute 'name'
</snip>
It prints the usage information (which is the right thing to do) - it then looks like it tries to run a command. This should probably just print the usage information and exit cleanly.
This is using trunk revision 237