Skip to content

Commit df0f027

Browse files
committed
simplified error handling during GitHub authentication
1 parent c9ed51e commit df0f027

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

check50/__main__.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import sys
1515
import tempfile
1616
import time
17-
import traceback
1817

1918
import attr
2019
import lib50
@@ -382,19 +381,7 @@ def main():
382381

383382
# If remote, push files to GitHub and await results
384383
if not args.local:
385-
try:
386-
commit_hash = lib50.push("check50", internal.slug, internal.CONFIG_LOADER, data={"check50": True}, auth_method=args.auth_method)[1]
387-
except lib50.ConnectionError:
388-
LOGGER.debug(traceback.format_exc())
389-
if not os.environ.get("CODESPACES"):
390-
raise _exceptions.Error(_(
391-
"check50 failed to authenticate your Github account. Please make sure you are connected to the internet and try again."
392-
))
393-
except Exception as e:
394-
LOGGER.debug(traceback.format_exc())
395-
raise _exceptions.Error(_("Sorry, something's wrong, please try again.\n"
396-
"If the problem persists, please visit our status page https://cs50.statuspage.io for more information.")) from e
397-
384+
commit_hash = lib50.push("check50", internal.slug, internal.CONFIG_LOADER, data={"check50": True})[1]
398385
with lib50.ProgressBar("Waiting for results") if "ansi" in args.output else nullcontext():
399386
tag_hash, results = await_results(commit_hash, internal.slug)
400387

0 commit comments

Comments
 (0)