##// END OF EJS Templates
Merge pull request #3733 from ivanov/pandoc-missing...
Paul Ivanov -
r11627:53e0d8b6 merge
parent child Browse files
Show More
@@ -47,9 +47,13 b" def pandoc(source, fmt, to, extra_args=None, encoding='utf-8'):"
47 command = ['pandoc', '-f', fmt, '-t', to]
47 command = ['pandoc', '-f', fmt, '-t', to]
48 if extra_args:
48 if extra_args:
49 command.extend(extra_args)
49 command.extend(extra_args)
50 p = subprocess.Popen(command,
50 try:
51 stdin=subprocess.PIPE, stdout=subprocess.PIPE
51 p = subprocess.Popen(command,
52 )
52 stdin=subprocess.PIPE, stdout=subprocess.PIPE
53 )
54 except OSError:
55 sys.exit("ERROR: Unable to launch pandoc. Please install pandoc:\n"
56 "(http://johnmacfarlane.net/pandoc/installing.html)")
53 out, _ = p.communicate(cast_bytes(source, encoding))
57 out, _ = p.communicate(cast_bytes(source, encoding))
54 out = out.decode(encoding, 'replace')
58 out = out.decode(encoding, 'replace')
55 return out[:-1]
59 return out[:-1]
General Comments 0
You need to be logged in to leave comments. Login now