Permalink
Browse files

Make missing markdown a runtime error.

  • Loading branch information...
ralsina committed Dec 28, 2012
1 parent 6dbdb57 commit 12395a452a143e2eb78e55ea1f05d69f44882024
Showing with 6 additions and 2 deletions.
  1. +6 −1 nikola/plugins/compile_markdown/__init__.py
  2. +0 −1 setup.py
@@ -28,7 +28,10 @@
import os
import re
-from markdown import markdown
+try:
+ from markdown import markdown
+except ImportError:
+ markdown = None
from nikola.plugin_categories import PageCompiler
@@ -39,6 +42,8 @@ class CompileMarkdown(PageCompiler):
name = "markdown"
def compile_html(self, source, dest):
+ if markdown is None:
+ raise Exception('To build this site, you need to install the "markdown" package.')
try:
os.makedirs(os.path.dirname(dest))
except:
View
@@ -38,7 +38,6 @@
'lxml',
'yapsy',
'mock>=1.0.0',
- 'markdown',
]
if sys.version_info[0] == 2:

0 comments on commit 12395a4

Please sign in to comment.