Make project pyflakes clean.

Added both a tox test-env for pyflakes and fixed the current pyflakes errors.
This did actually fix a couple of bugs.

The CI team has started using pyflakes on its projects and also has started
using oslo for things, so ignoring pyflakes warnings on the oslo code was
starting to get old. However, additionally, pyflakes is pretty solid, so we
should maybe consider gating on it across the board. (% locals() is the
biggest thing that we do that it doesn't like)

Change-Id: Iac1ca62db301892b7863711162fcbc74807eb24f
This commit is contained in:
Monty Taylor 2012-11-21 10:53:18 -08:00
parent 69aebcec45
commit 42d5bb5417
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ def to_primitive(value, convert_instances=False, level=0):
level=level + 1)
else:
return value
except TypeError, e:
except TypeError:
# Class objects are tricky since they may define something like
# __iter__ defined but it isn't callable as list().
return unicode(value)