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/l2db/errors.py | |
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/l2db/errors.py')
-rw-r--r-- | src/leap/soledad/common/l2db/errors.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/soledad/common/l2db/errors.py b/src/leap/soledad/common/l2db/errors.py index b502fc2d..d42860fe 100644 --- a/src/leap/soledad/common/l2db/errors.py +++ b/src/leap/soledad/common/l2db/errors.py @@ -143,10 +143,10 @@ class HTTPError(U1DBError): wire_description = None - def __init__(self, status, message=None, headers={}): + def __init__(self, status, message=None, headers=None): self.status = status self.message = message - self.headers = headers + self.headers = headers or {} def __str__(self): if not self.message: @@ -160,8 +160,8 @@ class Unavailable(HTTPError): wire_description = "unavailable" - def __init__(self, message=None, headers={}): - super(Unavailable, self).__init__(503, message, headers) + def __init__(self, message=None, headers=None): + super(Unavailable, self).__init__(503, message, headers or {}) def __str__(self): if not self.message: |