mirror of
https://github.com/certbot/certbot.git
synced 2026-06-07 15:52:08 -04:00
Made logfile location more clear
This commit is contained in:
parent
13913fd8e0
commit
8b3a766dc1
1 changed files with 4 additions and 3 deletions
|
|
@ -661,10 +661,11 @@ def _handle_exception(exc_type, exc_value, trace, args):
|
|||
|
||||
if issubclass(exc_type, Exception) and (args is None or not args.debug):
|
||||
if args is None:
|
||||
logfile = "letsencrypt.log"
|
||||
try:
|
||||
with open("letsencrypt.log", "w") as logfile:
|
||||
with open(logfile, "w") as logfd:
|
||||
traceback.print_exception(
|
||||
exc_type, exc_value, trace, file=logfile)
|
||||
exc_type, exc_value, trace, file=logfd)
|
||||
except: # pylint: disable=bare-except
|
||||
sys.exit("".join(
|
||||
traceback.format_exception(exc_type, exc_value, trace)))
|
||||
|
|
@ -674,7 +675,7 @@ def _handle_exception(exc_type, exc_value, trace, args):
|
|||
elif args is None:
|
||||
sys.exit(
|
||||
"An unexpected error occurred. Please see the logfile '{0}' "
|
||||
"for more details.".format(os.path.abspath("letsencrypt.log")))
|
||||
"for more details.".format(logfile))
|
||||
else:
|
||||
sys.exit(
|
||||
"An unexpected error occurred. Please see the logfiles in {0} "
|
||||
|
|
|
|||
Loading…
Reference in a new issue