Fixed #21362 -- Restored Python 2.5 compatibility.