Fixes a broken debug message in schema matching

This rather useful debug tool in the bowels of common/wsgi.py produces
a misleading message because, most often, the matching_schema has no
property called 'name'. Fixed it to print the schema in its entirety
because in most cases one would take the name and go lookup the schema
anyway.

The other way around would be to go and change all of apischema.py and
add a name property. This seemed to be the less intrusive and
disruptive change.

Change-Id: I4075bc911d2cc07cb6e7d98ffcff96441f7b3416
Closes-Bug: #1460033
This commit is contained in:
Amrith Kumar 2015-05-28 15:27:09 -04:00 committed by amrith
parent 0f3d242548
commit 342c52c6e9
1 changed files with 3 additions and 2 deletions

View File

@ -373,8 +373,9 @@ class Controller(object):
if cls.schemas:
matching_schema = cls.schemas.get(action, {})
if matching_schema:
LOG.debug("Found Schema: %s" % matching_schema.get("name",
"none"))
LOG.debug(
"Found Schema: %s" % matching_schema.get("name",
matching_schema))
return matching_schema
@staticmethod