Fix flake8 warning and Travis build