diff --git a/pelican/log.py b/pelican/log.py index cec07bf0..70e069d3 100644 --- a/pelican/log.py +++ b/pelican/log.py @@ -197,6 +197,7 @@ class FatalLogger(LimitLogger): if FatalLogger.errors_fatal: raise RuntimeError('Error encountered') + logging.setLoggerClass(FatalLogger) diff --git a/pelican/rstdirectives.py b/pelican/rstdirectives.py index b52785dd..def67cc7 100644 --- a/pelican/rstdirectives.py +++ b/pelican/rstdirectives.py @@ -70,6 +70,7 @@ class Pygments(Directive): parsed = highlight('\n'.join(self.content), lexer, formatter) return [nodes.raw('', parsed, format='html')] + directives.register_directive('code-block', Pygments) directives.register_directive('sourcecode', Pygments) @@ -90,4 +91,5 @@ def abbr_role(typ, rawtext, text, lineno, inliner, options={}, content=[]): expl = m.group(1) return [abbreviation(abbr, abbr, explanation=expl)], [] + roles.register_local_role('abbr', abbr_role) diff --git a/pelican/tools/pelican_quickstart.py b/pelican/tools/pelican_quickstart.py index 39e58f6f..ae0e8c9d 100755 --- a/pelican/tools/pelican_quickstart.py +++ b/pelican/tools/pelican_quickstart.py @@ -70,6 +70,7 @@ def _input_compat(prompt): r = raw_input(prompt) return r + if six.PY3: str_compat = str else: @@ -81,6 +82,7 @@ else: class _DEFAULT_PATH_TYPE(str_compat): is_default_path = True + _DEFAULT_PATH = _DEFAULT_PATH_TYPE(os.curdir) @@ -412,5 +414,6 @@ needed by Pelican. print('Done. Your new project is available at %s' % CONF['basedir']) + if __name__ == "__main__": main() diff --git a/pelican/tools/pelican_themes.py b/pelican/tools/pelican_themes.py index e4bcb7c9..fd60c424 100755 --- a/pelican/tools/pelican_themes.py +++ b/pelican/tools/pelican_themes.py @@ -14,6 +14,7 @@ def err(msg, die=None): if die: sys.exit((die if type(die) is int else 1)) + try: import pelican except: