Fix #1384 (Error when converting to LRF)

This commit is contained in:
Kovid Goyal 2008-12-12 13:48:03 -08:00
parent a811045b92
commit 1fa6c98ae0
2 changed files with 3 additions and 2 deletions

View File

@ -1920,7 +1920,7 @@ def process_file(path, options, logger=None):
options.anchor_ids = True
files = options.spine if (options.use_spine and hasattr(options, 'spine')) else [path]
conv = HTMLConverter(book, fonts, options, logger, files)
if options.use_spine and hasattr(options, 'toc'):
if options.use_spine and hasattr(options, 'toc') and options.toc is not None:
conv.create_toc(options.toc)
oname = options.output
if not oname:

View File

@ -422,7 +422,8 @@ def install_man_pages(fatal_errors):
raise
print 'Failed to install MAN pages as help2man is missing from your system'
break
raw = re.compile(r'^\.IP\s*^([A-Z :]+)$', re.MULTILINE).sub(r'.SS\n\1', p.stdout.read())
o = p.stdout.read()
raw = re.compile(r'^\.IP\s*^([A-Z :]+)$', re.MULTILINE).sub(r'.SS\n\1', o)
if not raw.strip():
print 'Unable to create MAN page for', prog
continue