Running otto with no arguments results in an uncaught exception

Bug #1197626 reported by Thomi Richards
6
This bug affects 1 person
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,destroy,start,stop,help} ...

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,destroy,start,stop,help}
    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/ubuntu/otto/ottolib/commands.py", line 46, in __init__
    self.__parse_args()
  File "/home/ubuntu/otto/ottolib/commands.py", line 148, in __parse_args
    self.args.name, create = self.args.cmd_name=="create")
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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.