Skip to content

Commit

Permalink
Merge pull request #154 from cs50/develop
Browse files Browse the repository at this point in the history
added printing of GitHub response for auth failures to help debugging…
  • Loading branch information
dmalan authored Jan 3, 2018
2 parents 9e01bcd + 4974547 commit f637c0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ class CustomInstall(install):
},
data_files=create_mo_files(),
url="https://github.com/cs50/submit50",
version="2.4.6"
version="2.4.7"
)
6 changes: 6 additions & 0 deletions submit50.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,16 @@ def rlinput(prompt, prefill=""):

# check if incorrect password
if res.status_code == 401:
if run.verbose:
cprint(str(res.headers), "yellow")
cprint(res.text, "yellow")
raise Error(_("Invalid username and/or password."))

# check for other error
elif res.status_code != 200:
if run.verbose:
cprint(str(res.headers), "yellow")
cprint(res.text, "yellow")
raise Error(_("Could not authenticate user."))

# canonicalize (capitalization of) username,
Expand Down

0 comments on commit f637c0c

Please sign in to comment.