From fd1aa87af0a0b05e4c899c63a85fc23affe08f1b 2010-07-26 01:40:12 From: Fernando Perez Date: 2010-07-26 01:40:12 Subject: [PATCH] Ensure crash handler works even when app isn't fully configured yet. In such a case, the ipython_dir may not have been computed yet, so we must avoid calling isdir() on a possibly None variable. --- diff --git a/IPython/core/crashhandler.py b/IPython/core/crashhandler.py index 5c9c3ab..00f0a68 100644 --- a/IPython/core/crashhandler.py +++ b/IPython/core/crashhandler.py @@ -115,12 +115,11 @@ class CrashHandler(object): # Use this ONLY for developer debugging (keep commented out for release) #color_scheme = 'Linux' # dbg - try: rptdir = self.app.ipython_dir except: rptdir = os.getcwd() - if not os.path.isdir(rptdir): + if rptdir is None or not os.path.isdir(rptdir): rptdir = os.getcwd() report_name = os.path.join(rptdir,self.crash_report_fname) # write the report filename into the instance dict so it can get