Fix nailgun code to pass flake8 tests

Command for flake tests:
  flake8 --exclude=__init__.py,welcome.py,docs,fuelmenu
  --ignore=H302,H802 --show-source --show-pep8 --count .
Implements: blueprint fix-flake8-in-nailgun-repo
Change-Id: Ieb482b2f096c0e8563e2dcd8f2f26e131e9bc716
Merge "Fix nailgun code to pass flake8 tests"