##// END OF EJS Templates
use pathlib in crashhandler
PhanatosZou -
Show More
@@ -23,6 +23,7 b' import os'
23 23 import sys
24 24 import traceback
25 25 from pprint import pformat
26 from pathlib import Path
26 27
27 28 from IPython.core import ultratb
28 29 from IPython.core.release import author_email
@@ -151,10 +152,10 b' class CrashHandler(object):'
151 152 try:
152 153 rptdir = self.app.ipython_dir
153 154 except:
154 rptdir = os.getcwd()
155 if rptdir is None or not os.path.isdir(rptdir):
156 rptdir = os.getcwd()
157 report_name = os.path.join(rptdir,self.crash_report_fname)
155 rptdir = Path.cwd()
156 if rptdir is None or not Path.is_dir(rptdir):
157 rptdir = Path.cwd()
158 report_name = rptdir / self.crash_report_fname
158 159 # write the report filename into the instance dict so it can get
159 160 # properly expanded out in the user message template
160 161 self.crash_report_fname = report_name
General Comments 0
You need to be logged in to leave comments. Login now