#22466 - Fixed python 2.5 compatibility issues