Skip to content

Commit 0e5d03f

Browse files
committed
simplified error handling for GitHub authentication
1 parent 6ee8c4b commit 0e5d03f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

submit50/__main__.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,7 @@ def main():
280280
else:
281281
auth_method = None
282282

283-
try:
284-
user_name, commit_hash, message = lib50.push("submit50", args.slug, CONFIG_LOADER, prompt=prompt, auth_method=auth_method)
285-
except lib50.ConnectionError:
286-
LOGGER.debug(traceback.format_exc())
287-
if not os.environ.get("CODESPACES"):
288-
raise Error(_(
289-
"submit50 failed to authenticate your Github account. Please make sure you are connected to the internet and try again."
290-
))
291-
except Exception as e:
292-
LOGGER.debug(traceback.format_exc())
293-
raise Error(_("Sorry, something's wrong, please try again.\n"
294-
"If the problem persists, please visit our status page https://cs50.statuspage.io for more information.")) from e
283+
user_name, commit_hash, message = lib50.push("submit50", args.slug, CONFIG_LOADER, prompt=prompt, auth_method=auth_method)
295284
print(message)
296285

297286
if __name__ == "__main__":

0 commit comments

Comments
 (0)