Skip to content

Commit bf16dde

Browse files
authored
Merge pull request #59 from oreillymedia/bug-fix-leftover-print
Remove a troublesome print statement
2 parents 54ffc6a + 3df6983 commit bf16dde

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

jupyter_book_to_htmlbook/file_processing.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,12 @@ def get_main_section(soup):
186186
try:
187187
main_title = article.find('h1').get_text()
188188
except AttributeError:
189-
main_title = soup.find("h1")
189+
main_title = soup.find("h1").get_text()
190190
err_msg = f"The chapter with title '{main_title}' " + \
191-
"has extra <section>s " + \
191+
"has extra sections " + \
192192
"that will not be processed. Please check the " + \
193193
"notebook source files."
194194
logging.warning(err_msg)
195-
print(err_msg)
196195
bibliography = soup.find('section', id="bibliography")
197196

198197
return main, bibliography

tests/test_file_processing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def test_process_chapter_single_file_with_multiple_h1s(self,
8181
process_chapter((test_env / 'many_a_levels.html'),
8282
test_env, test_out)
8383
log = caplog.text
84-
assert "will not be processed" in capsys.readouterr().out
8584
assert "will not be processed" in log
8685

8786
def test_process_chapter_single_file_bibliogrpahy(self,

0 commit comments

Comments
 (0)