Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Default parameters shouldn't overwrite the call's explicitly defined …

…parameters.
  • Loading branch information...
commit 57703bb6db1ea85ba7127ab5c802a903c11a4d59 1 parent 589f052
Stephen Weber StephenWeber authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 mailsnake/mailsnake.py
5 mailsnake/mailsnake.py
@@ -21,9 +21,10 @@ def __init__(self, apikey = '', extra_params = {}):
21 21
22 22 def call(self, method, params = {}):
23 23 url = self.base_api_url + method
24   - params.update(self.default_params)
  24 + all_params = self.default_params.copy()
  25 + all_params.update(params)
25 26
26   - post_data = urllib2.quote(json.dumps(params))
  27 + post_data = urllib2.quote(json.dumps(all_params))
27 28 headers = {'Content-Type': 'application/json'}
28 29 request = urllib2.Request(url, post_data, headers)
29 30 response = urllib2.urlopen(request)

0 comments on commit 57703bb

Please sign in to comment.
Something went wrong with that request. Please try again.