From 55a9b172250d5a4c000ddf5fb63f21978bdbf6fd 2014-08-05 19:00:42 From: cel Date: 2014-08-05 19:00:42 Subject: [PATCH] Fixed inferring the base name. --- diff --git a/IPython/nbformat/v2/__init__.py b/IPython/nbformat/v2/__init__.py index d766df5..04ab496 100644 --- a/IPython/nbformat/v2/__init__.py +++ b/IPython/nbformat/v2/__init__.py @@ -74,6 +74,7 @@ def parse_filename(fname): elif ext == u'.py': format = u'py' else: + basename = fname fname = fname + u'.ipynb' format = u'json' return fname, basename, format diff --git a/IPython/nbformat/v3/__init__.py b/IPython/nbformat/v3/__init__.py index 07979fe..640ce2f 100644 --- a/IPython/nbformat/v3/__init__.py +++ b/IPython/nbformat/v3/__init__.py @@ -71,6 +71,7 @@ def parse_filename(fname): elif ext == u'.py': format = u'py' else: + basename = fname fname = fname + u'.ipynb' format = u'json' return fname, basename, format