Fix and gate on H501, no locals for string formatting

Change-Id: I07e4a1a733639a343d4b3ee20927d50ba04bd7a3
This commit is contained in:
Joe Gordon 2013-08-15 19:11:28 -04:00
parent 8dbd684a5c
commit e0e5c2dfe5
4 changed files with 6 additions and 4 deletions

View File

@ -88,7 +88,9 @@ def get_resource_manager_extra_kwargs(f, args, allow_conflicts=False):
conflicting_keys = set(hook_kwargs.keys()) & set(extra_kwargs.keys())
if conflicting_keys and not allow_conflicts:
raise Exception("Hook '%(hook_name)s' is attempting to redefine"
" attributes '%(conflicting_keys)s'" % locals())
" attributes '%(conflicting_keys)s'" %
{'hook_name': hook_name,
'conflicting_keys': conflicting_keys})
extra_kwargs.update(hook_kwargs)

View File

@ -386,7 +386,7 @@ def _poll_for_status(poll_fn, obj_id, action, final_ok_states,
break
elif status == "error":
if not silent:
print("\nError %(action)s instance" % locals())
print("\nError %s instance" % action)
break
if not silent:

View File

@ -387,7 +387,7 @@ def _poll_for_status(poll_fn, obj_id, action, final_ok_states,
break
elif status == "error":
if not silent:
print("\nError %(action)s instance" % locals())
print("\nError %s instance" % action)
break
if not silent:

View File

@ -24,6 +24,6 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
downloadcache = ~/cache/pip
[flake8]
ignore = E12,E711,E721,E712,F841,F811,F821,H102,H302,H306,H403,H404,H501
ignore = E12,E711,E721,E712,F841,F811,F821,H102,H302,H306,H403,H404
show-source = True
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build