Skip to content

Commit

Permalink
Add login page checking to _check_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jllong-usgs committed Sep 14, 2017
1 parent 351924e commit c8b611f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pysb/SbSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,9 @@ def _check_errors(self, response):
return response
else:
raise Exception("Other HTTP error: " + str(response.status_code) + ": " + response.text)

if "MyUSGS : Login" in response.text:
raise Exception("Not logged in")

def _remove_josso_param(self, url):
"""Remove JOSSO parameter from URL
Expand Down

0 comments on commit c8b611f

Please sign in to comment.