fix int() error when list of bugs is blank

Review Request #100 — Created June 26, 2007 and submitted — Latest diff uploaded


Review Board SVN (deprecated)


When bugs_closed is blank and a ReviewRequest is encoded by the JSON encoder, the following line throws an error:
bugs_closed = [int(b.strip()) for b in o.bugs_closed.split(',')]
''.split(',') returns (as documented) the original string in a list, being [''].  This is iterated (it contains an item) and is passed to int, thus int('') is called, throwing an error.

The fix shown works, but does add a little extra cruft to the line.  Perhaps this could be split over multiple lines or otherwise abstracted.