Comment 4 for bug 827859

Revision history for this message
Daniel Manrique (roadmr) wrote :

The problem comes from this line in lib/process.py:

ready = select.select(tocheck, [], [], timeout)

according to the trace, an invalid timeout value was passed causing select.select to raise an exception. The timeout value itself comes from the message representing a job, and this is not validated by the Job class. Valid values for timeout are positive integers or floats, zero included, and "None". Note that "None" and 0 have special meanings so we can't just clobber "None" to "zero".

I'll propose an update to the Job class which preserves "None" but tries to convert anything else to a float, handling cleanly the case where a value can't be converted (meaning it was a string or something equally bizarre).