Fix pyflakes and pep8 in prep for flake8.

Change-Id: Ifc8c876760f8402fc3293326972b9286fb1635c9
Merge "Fix pyflakes and pep8 in prep for flake8."