Skip to content

Instantly share code, notes, and snippets.

@zhenyi2697
Created August 26, 2013 12:22
Show Gist options
  • Select an option

  • Save zhenyi2697/6340878 to your computer and use it in GitHub Desktop.

Select an option

Save zhenyi2697/6340878 to your computer and use it in GitHub Desktop.
Python: markdown not found error handling
try:
from markdown import markdown
except ImportError:
class MarkdownNotFound(Exception):
def __str__(self):
return "Markdown is not installed!"
raise MarkdownNotFound
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment