mirror of
https://github.com/vale981/ablog
synced 2025-03-06 01:31:39 -05:00
Fixed import/coding issues with build_safe.
This commit is contained in:
parent
605540efcb
commit
94de463fc7
2 changed files with 3 additions and 4 deletions
|
@ -24,7 +24,7 @@ def build_safe(builder):
|
|||
HTML builders, excluding `PickleHTMLBuilder` and `JSONHTMLBuilder`
|
||||
which run into issues when trying to serialize blog objects."""
|
||||
|
||||
if hasattr(builder, 'builder');
|
||||
if hasattr(builder, 'builder'):
|
||||
builder = builder.builder
|
||||
|
||||
return builder.format == 'html' and not builder.name in {'json', 'pickle'}
|
||||
|
|
|
@ -18,7 +18,6 @@ from docutils.parsers.rst import directives
|
|||
from docutils.utils import relative_path
|
||||
|
||||
import ablog
|
||||
from . import build_safe
|
||||
from .blog import Blog, slugify, os_path_join, revise_pending_xrefs
|
||||
|
||||
if sys.version_info >= (3, 0):
|
||||
|
@ -481,7 +480,7 @@ def generate_archive_pages(app):
|
|||
"""Generate archive pages for all posts, categories, tags, authors, and
|
||||
drafts."""
|
||||
|
||||
if not build_safe(app):
|
||||
if not ablog.build_safe(app):
|
||||
return
|
||||
|
||||
blog = Blog(app)
|
||||
|
@ -563,7 +562,7 @@ def generate_atom_feeds(app):
|
|||
"""Generate archive pages for all posts, categories, tags, authors, and
|
||||
drafts."""
|
||||
|
||||
if not build_safe(app):
|
||||
if not ablog.build_safe(app):
|
||||
return
|
||||
|
||||
blog = Blog(app)
|
||||
|
|
Loading…
Add table
Reference in a new issue