diff --git a/scripts/gitea.py b/scripts/gitea.py index 601c81c..e6d07af 100755 --- a/scripts/gitea.py +++ b/scripts/gitea.py @@ -70,7 +70,7 @@ class HTMLClient: def get_csrf_token(self, url: str) -> str: resp = self.session.get(url, allow_redirects=False) - if resp.status_code != 200 and resp.status_code != 302: + if resp.status_code != 200 and resp.status_code != 302 and resp.status_code != 303: print(resp.status_code, resp.text) raise Exception(f"Can't get csrf token: {resp.status_code}") csrf = self.__get_csrf_token(resp.text)