There was an error while loading. Please reload this page.
2 parents 2548a7a + 0a5c18f commit 9eb8187Copy full SHA for 9eb8187
pypandoc.py
@@ -68,10 +68,14 @@ def get_pandoc_formats():
68
Dynamic preprocessor for Pandoc formats.
69
Return 2 lists. "from_formats" and "to_formats".
70
'''
71
- p = subprocess.Popen(
72
- ['pandoc', '-h'],
73
- stdin=subprocess.PIPE,
74
- stdout=subprocess.PIPE)
+ try:
+ p = subprocess.Popen(
+ ['pandoc', '-h'],
+ stdin=subprocess.PIPE,
75
+ stdout=subprocess.PIPE)
76
+ except OSError:
77
+ raise OSError("You probably do not have pandoc installed.")
78
+
79
help_text = p.communicate()[0].decode().splitlines(False)
80
txt = ' '.join(help_text[1:help_text.index('Options:')])
81
0 commit comments