When invoked without arguments, maascli is too terse

Bug #1052876 reported by Gavin Panella
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Low
Jeroen T. Vermeulen
1.2
High
Julian Edwards

Bug Description

$ bin/maascli
usage: ./bin/maascli [-h] {api} ...
bin/maascli: error: too few arguments

An invocation without any argument should be a little bit more verbose.

Tags: cli Edit Tag help

Related branches

Gavin Panella (allenap)
tags: added: cli
Revision history for this message
Raphaël Badin (rvb) wrote :

Looks like changes we made recently made this even uglier (this is running the SRU package on precise):
root@autopkgtest:~# maas-cli
usage: /usr/lib/python2.7/dist-packages/maascli/__main__.py [-h] COMMAND ...
/usr/lib/python2.7/dist-packages/maascli/__main__.py: error: too few arguments

Revision history for this message
Gavin Panella (allenap) wrote : Re: [Bug 1052876] Re: When invoked without arguments, maascli is too terse

The maas-cli script is:

  #!/bin/sh
  exec python -m maascli "$@"

The original $0 gets lost.

A fix might be to change this script to:

  #!/usr/bin/python
  from maascli import main
  main()

Changed in maas:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers