Skip to content

Commit

Permalink
fix: Check HTTP code for redirect before raise (#39)
Browse files Browse the repository at this point in the history
Closes #35 #36
  • Loading branch information
renyuneyun authored Oct 31, 2023
1 parent 6061bb4 commit 74b54d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/solid/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def login(self, idp, username, password):
}

r = self.client.post(url, data=data)
r.raise_for_status()

if not r.is_redirect:
r.raise_for_status()

if not self.is_login:
raise Exception('Cannot login.')

0 comments on commit 74b54d9

Please sign in to comment.