fix: Pass the auth arg as a tuple instead of str

pull/13/head
Etienne Monier 2022-03-08 16:32:11 +01:00
rodzic 67862b07c5
commit 507ac1de18
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -33,8 +33,8 @@ class Gitea:
Args:
gitea_url (str): The Gitea instance URL.
token_text (str, None): The access token, by default None.
auth (str, None): The user credentials `username:password`,
by default None.
auth (tuple, None): The user credentials
`(username, password)`, by default None.
verify (bool): If True, allow insecure server connections
when using SSL.
log_level (str): The log level, by default `INFO`.
@ -53,7 +53,7 @@ class Gitea:
if token_text:
self.headers["Authorization"] = "token " + token_text
if auth:
self.requests.auth = tuple(auth.split(":"))
self.requests.auth = auth
# Manage SSL certification verification
self.requests.verify = verify