removed caching

pull/12/head
Langenfeld 2021-12-13 10:39:19 +01:00
rodzic f74c94f4cf
commit 0ebbcbf903
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -4,7 +4,6 @@ from typing import List, Dict, Union
import requests
from frozendict import frozendict
from httpcache import CachingHTTPAdapter
from .apiobject import User, Organization, Repository, Team
from .exceptions import NotFoundException, ConflictException, AlreadyExistsException
@ -20,7 +19,7 @@ class Gitea:
CREATE_ORG = """/admin/users/%s/orgs""" # <username>
CREATE_TEAM = """/orgs/%s/teams""" # <orgname>
def __init__(self, gitea_url: str, token_text: str, cached=False, log_level="INFO"):
def __init__(self, gitea_url: str, token_text: str, log_level="INFO"):
""" Initializing Gitea-instance."""
self.logger = logging.getLogger(__name__)
self.logger.setLevel(log_level)
@ -30,9 +29,6 @@ class Gitea:
}
self.url = gitea_url
self.requests = requests.Session()
if cached:
self.requests.mount("http://", CachingHTTPAdapter())
self.requests.mount("https://", CachingHTTPAdapter())
def __get_url(self, endpoint):
url = self.url + "/api/v1" + endpoint