From 546d856f4fea9101fe1a155016427bb6988f5a4f 2024-11-11 17:29:56 From: user202729 <25191436+user202729@users.noreply.github.com> Date: 2024-11-11 17:29:56 Subject: [PATCH] crashhandler: Cast rptdir to Path --- diff --git a/IPython/core/crashhandler.py b/IPython/core/crashhandler.py index f60a75b..0246d82 100644 --- a/IPython/core/crashhandler.py +++ b/IPython/core/crashhandler.py @@ -157,10 +157,10 @@ class CrashHandler(object): # Use this ONLY for developer debugging (keep commented out for release) #color_scheme = 'Linux' # dbg try: - rptdir = self.app.ipython_dir + rptdir = Path(self.app.ipython_dir) except: rptdir = Path.cwd() - if rptdir is None or not Path.is_dir(rptdir): + if not rptdir.is_dir(): rptdir = Path.cwd() report_name = rptdir / self.crash_report_fname # write the report filename into the instance dict so it can get