Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 1e2edfc

Browse files
committed
Fix: misplaced return
* caused us to skip a major part of the pretext build.
1 parent 7750485 commit 1e2edfc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runestone/server/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def _build_ptx_book(config, gen, manifest, course, click=click):
140140
else:
141141
click.echo("Missing document-id please add to <docinfo>")
142142
return False
143-
return True
144143

145144
mpath = Path(os.getcwd(), "published", cname, manifest)
146145
click.echo("Processing Manifest")
@@ -152,6 +151,7 @@ def _build_ptx_book(config, gen, manifest, course, click=click):
152151
# update the library page
153152
click.echo("updating library...")
154153
update_library(config, mpath, course)
154+
return True
155155

156156

157157
# Support Functions
@@ -246,7 +246,7 @@ def update_library(config, mpath, course, click=click):
246246
res = eng.execute(f"select * from library where basecourse = '{course}'")
247247
except:
248248
click.echo("Missing library table? You may need to run an alembic migration.")
249-
sys.exit()
249+
return False
250250

251251
if res.rowcount == 0:
252252
eng.execute(
@@ -264,6 +264,7 @@ def update_library(config, mpath, course, click=click):
264264
where basecourse = '{course}'
265265
"""
266266
)
267+
return True
267268

268269

269270
def populate_static(config, mpath: Path, course: str, click=click):
@@ -302,3 +303,4 @@ def populate_static(config, mpath: Path, course: str, click=click):
302303
)
303304
else:
304305
click.echo(f"_static files already up to date for {version}")
306+
return True

0 commit comments

Comments
 (0)