diff --git a/IPython/core/crashhandler.py b/IPython/core/crashhandler.py index c85c766..a6a74e8 100644 --- a/IPython/core/crashhandler.py +++ b/IPython/core/crashhandler.py @@ -27,7 +27,7 @@ from pprint import pformat from IPython.core import ultratb from IPython.core.release import author_email from IPython.utils.sysinfo import sys_info -from IPython.utils.py3compat import input, getcwd +from IPython.utils.py3compat import input #----------------------------------------------------------------------------- # Code @@ -139,9 +139,9 @@ class CrashHandler(object): try: rptdir = self.app.ipython_dir except: - rptdir = getcwd() + rptdir = os.getcwd() if rptdir is None or not os.path.isdir(rptdir): - rptdir = getcwd() + 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 # properly expanded out in the user message template diff --git a/IPython/testing/plugin/ipdoctest.py b/IPython/testing/plugin/ipdoctest.py index 2d4dd9b..841ccdf 100644 --- a/IPython/testing/plugin/ipdoctest.py +++ b/IPython/testing/plugin/ipdoctest.py @@ -45,7 +45,7 @@ from nose.plugins import doctests, Plugin from nose.util import anyp, tolist # Our own imports -from IPython.utils.py3compat import builtin_mod, PY3, getcwd +from IPython.utils.py3compat import builtin_mod, PY3 if PY3: from io import StringIO @@ -259,7 +259,7 @@ class DocTestCase(doctests.DocTestCase): # Save our current directory and switch out to the one where the # test was originally created, in case another doctest did a # directory change. We'll restore this in the finally clause. - curdir = getcwd() + curdir = os.getcwd() #print 'runTest in dir:', self._ori_dir # dbg os.chdir(self._ori_dir)