halst/schema — pull request #2 by taavi (2012-09-06 18:58:49+00:00)
Title: Fix UnboundLocalError and wrong error messages on dict validation

Some degenerate scenarios were causing Schema to explode with UnboundLocalError: local variable 'skey' referenced before assignment.

Other scenarios led to a correct SchemaError, but with a backwards message (complaining that a provided key didn't exist, instead of complaining about the missing key from the schema).

Thanks! :)