1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-21 19:01:07 +03:00

Reduce verbosity of error tracebacks

Counteracting #1413 and going a little further.
This commit is contained in:
Peter Eckersley
2015-11-28 02:06:53 -08:00
parent 90a8b555b1
commit 107cb995af

View File

@@ -1150,9 +1150,9 @@ def _handle_exception(exc_type, exc_value, trace, args):
else:
# Tell the user a bit about what happened, without overwhelming
# them with a full traceback
msg = ("An unexpected error occurred.\n" +
traceback.format_exception_only(exc_type, exc_value)[0] +
"Please see the ")
err = traceback.format_exception_only(exc_type, exc_value)[0]
_code, _sep, err = err.partition(":: ")
msg = "An unexpected error occurred:\n" + err + "Please see the "
if args is None:
msg += "logfile '{0}' for more details.".format(logfile)
else: