[libvirt] [jenkins-ci PATCH v2 03/20] quayadmin: Tweak quiet logic

Andrea Bolognani abologna at redhat.com
Thu Jul 18 08:02:33 UTC 2019


On Wed, 2019-07-17 at 18:14 +0100, Daniel P. Berrangé wrote:
> On Wed, Jul 17, 2019 at 03:49:12PM +0200, Andrea Bolognani wrote:
> > If we've been asked not to produce any output, we can bail
> > early: doing so means we don't need to increase indentation
> > for subsequent code, and in some cases we can even avoid
> > fetching the JSON data from the response object.
> 
> Unless I'm mis-reading the last point doesn't seem to affect
> this patch - we're still fetching JSON, which is good I think,
> as it means we check the response is well formed, and not an
> error of some kind

We skip calling res.json() when all we need the JSON for is some
data to be displayed and we're in quiet mode. All the usual checks
on the return code still happens. I assume res.json() needs to do
some processing when it's called, and now we can skip that.

Either way that's a secondary concern, it was mostly about the
indentation :)

Thanks for the review, and for getting the script started in the
first place! The entire series has been pushed now.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list