Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Commit

Permalink
Remove mutable default
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcs committed Nov 28, 2018
1 parent 1a82a87 commit 677337b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pierone/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ def _get(self, path, exceptions: dict = {}, *args, **kwargs) -> requests.Respons
self._handle_exceptions(error, exceptions)
return response

def _post(self, path, json=None, exceptions: dict = {}, *args, **kwargs) -> requests.Response:
def _post(self, path, json=None, exceptions: dict = None, *args, **kwargs) -> requests.Response:
"""
POSTs things to Pier One.
``path`` will be prepended with the registry's base url.
``exceptions`` is a map of status of code and exceptions to be raised if they happen.
Everything else is passed to the ``session.post`` request.
"""
exceptions = exceptions or {}
url = self.url + path
response = self.session.post(url, json=json, *args, **kwargs)
try:
Expand Down

0 comments on commit 677337b

Please sign in to comment.