diff --git a/pierone/api.py b/pierone/api.py index ab36e6a..99b5d58 100644 --- a/pierone/api.py +++ b/pierone/api.py @@ -55,7 +55,7 @@ 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. @@ -63,6 +63,7 @@ def _post(self, path, json=None, exceptions: dict = {}, *args, **kwargs) -> requ ``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: