return result
if action not in self.CREATE_OR_UPDATE_ACTION:
- msg = _("Unexpected action %s" % action)
+ msg = _('Unexpected action %s') % action
# This should not happen, so return HeatInternalFailureError
return exception.HeatInternalFailureError(detail=msg)
elif resp.status == 404:
raise exception.AuthUrlNotFound(url=token_url)
else:
- raise Exception(_('Unexpected response: %s' % resp.status))
+ raise Exception(_('Unexpected response: %s') % resp.status)
def _v2_auth(self, token_url):
def get_endpoint(service_catalog):
'''
if re.match("[a-zA-Z][a-zA-Z0-9_.-]*$", stack_name) is None:
- raise ValueError(_("Invalid stack name %s" % stack_name
- + ", must contain only alphanumeric or "
- + "\"_-.\" characters, must start with alpha"))
+ raise ValueError(_('Invalid stack name %s'
+ ' must contain only alphanumeric or '
+ '\"_-.\" characters, must start with alpha'
+ ) % stack_name)
self.id = stack_id
self.context = context
python setup.py testr --coverage
[flake8]
-ignore = F403,F841,H201,H302,H303,H306,H404,H702,H703
+ignore = F403,F841,H201,H302,H303,H306,H404,H703
# F403 'from sqlalchemy import *' used; unable to detect undefined names
# F841 local variable 'json_template' is assigned to but never used
# H201 no 'except:' at least use 'except Exception:'
# H303 No wildcard (*) import.
# H306 imports not in alphabetical order
# H404 multi line docstring should start with a summary
-# H702 Formatting operation should be outside of localization method call
# H703 Multiple positional placeholders
show-source = true
builtins = _