[PATCH] Fix logging issue with python2.6