diff options
author | Victor Shyba <victor1984@riseup.net> | 2017-09-21 18:17:30 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2017-10-05 05:41:40 -0300 |
commit | 5d797ddbfe226a2fb6ebff5b4f4184bb41b1b34d (patch) | |
tree | bd91ef1b8a4fe9fdc588938810b33cdb4ef7c461 /src/leap/soledad/common/couch | |
parent | aef72180f681a46534c0d934a62c1376ea2489db (diff) |
[refactor] change default dict params
As raised by kali, they can bring some bugs and avoiding it is pretty
easy.
-- Resolves: #8957
Diffstat (limited to 'src/leap/soledad/common/couch')
-rw-r--r-- | src/leap/soledad/common/couch/support.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/soledad/common/couch/support.py b/src/leap/soledad/common/couch/support.py index bfc4fef6..98000dc9 100644 --- a/src/leap/soledad/common/couch/support.py +++ b/src/leap/soledad/common/couch/support.py @@ -49,13 +49,14 @@ class MultipartWriter(object): self._boundary = boundary self._build_headers('related', headers) - def add(self, mimetype, content, headers={}): + def add(self, mimetype, content, headers=None): """ Add a part to the multipart stream. """ self.fileobj.write('--') self.fileobj.write(self._boundary) self.fileobj.write(self.CRLF) + headers = headers or {} headers['Content-Type'] = mimetype self._write_headers(headers) if content: |