#254 Get csrf token properly when retry bodhi API call
Merged by cqi. Opened by cqi.
cqi/fedpkg fix-command-override  into  master

Download 254.patch

self.csrf must be called before trying to call method to save and extend
Bodhi update. This patch fixes two issues, 1) incorrect call to cookies
clear method, 2) call self.csrf to get a new token before second call of
send_request to extend update expiration.

For simplicity, retry is refactored into a decorator.

Signed-off-by: Chenxiong Qi cqi@redhat.com

rebased onto ae88ba0258e7748f9738dba5470dd8abeec0bc78

rebased onto a99726a7eaba33bb236cc8fd489e16390fd0b5fd

Looks reasonable. I'm not sure about the second issue mentioned in the description. Where do you call self.csrf?

bodhi.client.bindings.BodhiClient.save_override calls self.csrf internally.

extend_override also calls self.csrf to construct POST data.

Ok then. :thumbsup: (I didn't test it, but the code looks good to me).

OK for me.

rebased onto 3cb5dc93bc92b97239ecec555cf002e9fa8c6376

Pull-Request has been merged by cqi

Metadata