Fix setting loglevel on python 2.6