Fixes #1823: '.' as <module_path> for sphinx-apidoc cause an unfriendly error. Now '.' is converted to absolute path automatically.

This commit is contained in:
shimizukawa
2015-04-05 19:05:26 +09:00
parent 6c1ba34614
commit 5a3fcea4b6
2 changed files with 3 additions and 1 deletions

View File

@@ -13,6 +13,8 @@ Bugs fixed
* #1794: custom theme extended from alabaster or sphinx_rtd_theme can't find base theme.
* #1834: compatibility for docutils-0.13: handle_io_errors keyword argument for
docutils.io.FileInput cause TypeError.
* #1823: '.' as <module_path> for sphinx-apidoc cause an unfriendly error. Now '.'
is converted to absolute path automatically.
Release 1.3.1 (released Mar 17, 2015)

View File

@@ -328,7 +328,7 @@ Note: By default this script will not overwrite already created files.""")
if not opts.destdir:
parser.error('An output directory is required.')
if opts.header is None:
opts.header = path.normpath(rootpath).split(path.sep)[-1]
opts.header = path.normpath(path.abspath(rootpath)).split(path.sep)[-1]
if opts.suffix.startswith('.'):
opts.suffix = opts.suffix[1:]
if not path.isdir(rootpath):