Launchpad.set_link() tries to return a string as an int

Bug #270472 reported by Graham Binns
2
Affects Status Importance Assigned to Milestone
Bugzilla Launchpad Plugin
Fix Released
High
Graham Binns

Bug Description

Launchpad.set_link() returns the current Launchpad ID for a bug when the Launchpad ID is updated or removed. If no Launchpad ID is currently set, Launchpad.set_link() returns an empty string as the current Launchpad bug ID. However, the XML-RPC response for Launchpad.set_link() always tries to wrap the returned 'launchpad_id' as an int. Obviously, this is invalid where the Launchpad ID is an empty string, and so XML-RPC clients that perform response value validation will fail when trying to parse these responses. The Python 2.4 XML-RPC client fails thus: `ValueError: invalid literal for int(): `.

When Launchpad.set_link() is called on a Bugzilla bug that doesn't have a launchpad_id set, the returned 'launchpad_id' variable should be set to 0 (since there's no Bug 0 in Launchpad).

Graham Binns (gmb)
Changed in bugzilla-launchpad:
assignee: nobody → gmb
importance: Undecided → High
status: New → Triaged
status: Triaged → In Progress
Revision history for this message
Graham Binns (gmb) wrote :

This patch fixes the problem.

Revision history for this message
Max Kanat-Alexander (mkanat) wrote :

That's interesting. I would expect your XML-RPC client to interpret that as NULL. (Sadly the XML-RPC spec is silent on this issue.)

Changed in bugzilla-launchpad:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in bugzilla-launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.