Skip to content

Commit

Permalink
Remove a troublesome print statement
Browse files Browse the repository at this point in the history
And also clean up the error message so it doesn't do silly things like create <section> elements inside the atlas log unnecessarily
  • Loading branch information
delfanbaum committed Feb 14, 2024
1 parent 54ffc6a commit d3f939e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jupyter_book_to_htmlbook/file_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,12 @@ def get_main_section(soup):
try:
main_title = article.find('h1').get_text()
except AttributeError:
main_title = soup.find("h1")
main_title = soup.find("h1").get_text()
err_msg = f"The chapter with title '{main_title}' " + \
"has extra <section>s " + \
"has extra sections " + \
"that will not be processed. Please check the " + \
"notebook source files."
logging.warning(err_msg)
print(err_msg)
bibliography = soup.find('section', id="bibliography")

return main, bibliography
Expand Down

0 comments on commit d3f939e

Please sign in to comment.