Skip to content

Commit

Permalink
Merge pull request #62 from madeddie/small_fix
Browse files Browse the repository at this point in the history
Make all http requests raise for status
  • Loading branch information
madeddie authored May 29, 2024
2 parents f319495 + 278f9c9 commit 7938558
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tyora/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ def login(self, username: str, password: str) -> None:
login_form["session[login]"] = username
login_form["session[password]"] = password

_ = self.post(
res = self.post(
url=urljoin(res.url, action),
headers={"referer": res.url},
data=login_form,
)
res.raise_for_status()

if not self.is_logged_in:
logger.debug(
Expand Down

0 comments on commit 7938558

Please sign in to comment.