Fix H702 pep8 error with latest hacking
nova test job on hacking master is failing with 2020-02-24 01:14:53.698965 | ubuntu-bionic | ./nova/api/metadata/handler.py:251:55: H702: Formatting operation should be outside of localization method call - https://review.opendev.org/#/c/705514/ This is H702 error for localization formatting. Change-Id: I9eaa90c273327a3ca0ca1722a45017e59e9f0f0c
This commit is contained in:
@@ -248,10 +248,10 @@ class MetadataRequestHandler(wsgi.Application):
|
|||||||
|
|
||||||
if len(ports) != 1:
|
if len(ports) != 1:
|
||||||
msg = _('Expected a single port matching provider %(pr)s '
|
msg = _('Expected a single port matching provider %(pr)s '
|
||||||
'and IP %(ip)s. Found %(count)d.' % {
|
'and IP %(ip)s. Found %(count)d.') % {
|
||||||
'pr': provider_id,
|
'pr': provider_id,
|
||||||
'ip': instance_address,
|
'ip': instance_address,
|
||||||
'count': len(ports)})
|
'count': len(ports)}
|
||||||
|
|
||||||
LOG.error(msg)
|
LOG.error(msg)
|
||||||
raise webob.exc.HTTPBadRequest(explanation=msg)
|
raise webob.exc.HTTPBadRequest(explanation=msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user