Closed klahnakoski closed 8 years ago
I'm not sure what you're referring to. Could you add a link to the code? Could you provide an example of how you're calling the function?
The offending line is [1]. This is how I am calling:
receiver = Receiver(
lookup_credentials,
auth,
request.url,
request.method,
content=request.data,
content_type=request.headers['Content-Type'],
seen_nonce=seen_nonce
)
where lookup_credentials
is returning a Mapping [2]. Mapping
is a more general version of a dict
. Maybe just getting rid of the type check is fine, since you are verifying the properties exist already.
[1] https://github.com/kumar303/mohawk/blob/42103d69edfeb2e956ad03d266e0e0c856b9f3e4/mohawk/util.py#L28 [2] https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping
Sorry about that, should be fixed on master now.
It is interfering with other Mapping instances that I send to it.