From 7681cd9a188b1238fa921c60721627ed22fb9e33 Mon Sep 17 00:00:00 2001 From: ArtemIsmagilov Date: Wed, 12 Jun 2024 18:30:00 +0400 Subject: [PATCH] change mut arg on None and added checker is None --- caldav/davclient.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/caldav/davclient.py b/caldav/davclient.py index 9e85eac..89edc96 100644 --- a/caldav/davclient.py +++ b/caldav/davclient.py @@ -618,11 +618,14 @@ def request( url: str, method: str = "GET", body: str = "", - headers: Mapping[str, str] = {}, + headers: Mapping[str, str] = None, ) -> DAVResponse: """ Actually sends the request, and does the authentication """ + if headers is None: + headers = {} + combined_headers = self.headers.copy() combined_headers.update(headers) if (body is None or body == "") and "Content-Type" in combined_headers: