Ensure method is never None in send_document

matrix-delivery
Jason Robinson 2020-12-25 17:08:28 +02:00
rodzic 7bd114ac59
commit 0d92387339
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -169,6 +169,8 @@ def send_document(url, data, timeout=10, method="post", *args, **kwargs):
:returns: Tuple of status code (int or None) and error (exception class instance or None)
"""
logger.debug("send_document: url=%s, data=%s, timeout=%s, method=%s", url, data, timeout, method)
if not method:
method = "post"
headers = CaseInsensitiveDict({
'User-Agent': USER_AGENT,
})