use py2.6 compatiable code style

need to fix the tornado tests before enable 2.6 ci