Commit e22e387b authored by Josh Roesslein's avatar Josh Roesslein
Browse files

Fix paramter validation.

parent 44e7d36f
......@@ -27,8 +27,12 @@ def bind_api(path, parser, allowed_param=None, method='GET', require_auth=False,
for k, arg in kargs.items():
if k in parameters:
raise TweepError('Multiple values for parameter %s supplied!' % k)
if k not in allowed_param:
raise TweepError('Invalid parameter %s supplied!' % k)
parameters[k] = arg
if len(args) > 0 or len(kargs) > 0:
raise TweepError('This method takes no parameters!')
parameters = None
# Assemble headers
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment