Code review comment for lp:~gmb/maas/fix-null-when-releasing-ip-bug-1383668

Revision history for this message
Gavin Panella (allenap) wrote :

> On 22 October 2014 00:51, Julian Edwards wrote:
> > Why not just make the cli print out "Success" when the returned code
> > is a 200 and there's no other info in the content body?
>
> Because that's just too simple and we could overthink a plate of
> beans?
>
> That's a nice fix for this particular bug. It doesn't solve the
> general point that Gavin's making. However, I'm all for a quick fix
> for this (it's marked trivial, after all) and then onto other things.

Actually, I like that approach. I think it should be treated the same as
the header:

> * Only print it out from the maas CLI when sys.stdout.isatty() is
> True. Perhaps present it like so:
>
> $ maas thing verb param=value
> Thing has been successfully verbed.
> Machine-readable output follows:
> null
>
> The first 2 lines would not be printed when piping to a script, for
> example.

« Back to merge proposal