diff --git a/IPython/utils/path.py b/IPython/utils/path.py index d28642b..1534af3 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -308,7 +308,7 @@ def get_ipython_dir(): " using a temp directory."%ipdir) ipdir = tempfile.mkdtemp() elif not os.path.exists(ipdir): - parent, _ = os.path.split(ipdir) + parent = os.path.dirname(ipdir) if not _writable_dir(parent): # ipdir does not exist and parent isn't writable warnings.warn("IPython parent '%s' is not a writable location,"