Show More
@@ -113,8 +113,7 b" def pandoc(source, fmt, to, extra_args=None, encoding='utf-8'):" | |||||
113 | if extra_args: |
|
113 | if extra_args: | |
114 | cmd.extend(extra_args) |
|
114 | cmd.extend(extra_args) | |
115 |
|
115 | |||
116 |
# |
|
116 | # this will raise an exception that will pop us out of here | |
117 | pandoc_available(failmode="raise", alt=cmd) |
|
|||
118 | check_pandoc_version() |
|
117 | check_pandoc_version() | |
119 |
|
118 | |||
120 | # we can safely continue |
|
119 | # we can safely continue | |
@@ -134,11 +133,10 b' def get_pandoc_version():' | |||||
134 | else: |
|
133 | else: | |
135 | return pandoc.version |
|
134 | return pandoc.version | |
136 | except AttributeError: |
|
135 | except AttributeError: | |
|
136 | # if pandoc is missing let the exception bubble us out of here | |||
|
137 | pandoc_available(failmode="raise") | |||
137 | cmd = ["pandoc", "-v"] |
|
138 | cmd = ["pandoc", "-v"] | |
138 | try: |
|
|||
139 |
|
|
139 | out = subprocess.check_output(cmd, universal_newlines=True) | |
140 | except OSError as e: |
|
|||
141 | raise PandocMissing(cmd, e) |
|
|||
142 | pv_re = re.compile(r'(\d{0,3}\.\d{0,3}\.\d{0,3})') |
|
140 | pv_re = re.compile(r'(\d{0,3}\.\d{0,3}\.\d{0,3})') | |
143 | pandoc.version = pv_re.search(out).group(0) |
|
141 | pandoc.version = pv_re.search(out).group(0) | |
144 | return pandoc.version |
|
142 | return pandoc.version |
General Comments 0
You need to be logged in to leave comments.
Login now