Skip to content

Commit

Permalink
Merge pull request #277 from kroman0/patch-1
Browse files Browse the repository at this point in the history
Fixed importing MappingSchema
  • Loading branch information
almet committed Feb 25, 2015
2 parents 637670f + d54fcda commit ef50391
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cornice/schemas.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import colander
import webob.multidict

from pyramid.path import DottedNameResolver
Expand Down Expand Up @@ -95,9 +94,9 @@ def from_colander(klass, colander_schema):

def validate_colander_schema(schema, request):
"""Validates that the request is conform to the given schema"""
from colander import Invalid, Sequence, drop, null
from colander import Invalid, Sequence, drop, null, MappingSchema

if not isinstance(schema.colander_schema, colander.MappingSchema):
if not isinstance(schema.colander_schema, MappingSchema):
raise SchemaError('schema is not a MappingSchema: %s' %
type(schema.colander_schema))

Expand Down

0 comments on commit ef50391

Please sign in to comment.