fix format function arguments for py2.6