#317 Make fedpkg update output a report after success
Merged by onosek. Opened by eclipseo.
Unknown source master

Download 317.patch

Fixes #315

Signed-off-by: Robert-André Mauchin zebob.m@gmail.com

Remove munch? It is not used in this patch.

The resp variable contains munch data, It fails to pass the data to bodhi.update_str if munch is not imported. (munch is already a deps of bodhi bindings).

For the failed build I think maybe the data returned by save is not conform during the test, hence it fail in update_str. Would it be ok to use a try: except: to bypass that error?

rebased onto 7a1de775279a3c43d00e07574526a526892e4330

rebased onto 5646753c4d0c19006802c0c8fde2b2d2ce977ad4

Hi @eclipseo,

I haven't found what returns bodhi.save in documentation:
https://bodhi.readthedocs.io/en/latest/python_bindings.html#bodhi.client.bindings.BodhiClient.save
but let's say it returns the data. But I definitely prefer try&except approach to handle this. Making munch another dependency of fedpkg doesn't mean minor efford.

Thank you.

Try this link: https://bodhi.fedoraproject.org/docs/python_bindings.html#bodhi.client.bindings.BodhiClient.save

It says:
Returns: The Bodhi server’s response to the request.
Return type: munch.Munch

I don't see adding munch as an issue as it is already a dependency of the Bodhi Python bindings, which we use.

Thank you for the documentation link, it is OK.

Technically yes, I do not have to necessarily add munch to fedpkg specfile as it is indirectly installed. But I would like to have all used imports directly mentioned there. At least to know what fedpkg depends on.

I also think that try&except structure is more straightforward and it can additionally cover unexcepted exceptions and not just unequal returned type.

rebased onto 7c1ca0ef06501ca8e84cc00546940a6ea7b8ce84

How about now?

I now pass the bodhi.save(**detail) call directly to bodhi.update_str, so munch is not needed.

I added a try/except for the test failure.

rebased onto 06cd4372e090425306b1a0b85938379f04fc3089

This change looks good. I will merge it.

Pull-Request has been merged by onosek

Metadata