Skip to content

Commit 70eba9f

Browse files
author
Your Name
committed
Address frequent pandoc failures in CI/CD runs
1 parent 064d3fc commit 70eba9f

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

cecli/scrape.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def scrape_with_httpx(self, url):
220220
return None, None
221221

222222
def try_pandoc(self):
223-
if self.pandoc_available:
223+
if self.pandoc_available is not None:
224224
return
225225

226226
try:
@@ -232,11 +232,9 @@ def try_pandoc(self):
232232

233233
try:
234234
pypandoc.download_pandoc(delete_installer=True)
235-
except Exception as err:
236-
self.print_error(f"Unable to install pandoc: {err}")
237-
return
238-
239-
self.pandoc_available = True
235+
self.pandoc_available = True
236+
except Exception:
237+
self.pandoc_available = False
240238

241239
def html_to_markdown(self, page_source):
242240
from bs4 import BeautifulSoup

0 commit comments

Comments
 (0)