fixed pyflakes on py2
Merge pull request #2790 from ojii/pyflaked-fixed

fixed pyflakes on py2