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

Commit be94066

Browse files
committed
update build to rebuild chapter information in new folder structure.
1 parent e5585ac commit be94066

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

runestone/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
from .tabbedStuff import *
1414
from .video import *
1515

16-
import os
16+
import os, sys
17+
1718
def runestone_static_dirs():
1819
basedir = os.path.dirname(__file__)
1920
module_paths = [ x for x in os.listdir(basedir) if os.path.isdir(os.path.join(basedir,x))]
@@ -72,11 +73,14 @@ def build(options):
7273

7374

7475
try:
76+
sys.path.insert(0,os.path.join('..','..','modules'))
7577
from chapternames import populateChapterInfo
7678
populateChapterInfo(options.build.project_name, "%s/index.rst" % options.build.sourcedir)
7779
print('Creating Chapter Information')
78-
except ImportError:
79-
print('Chapter information database population skipped, This is OK for a standalone build.')
80+
except ImportError as e:
81+
print('Chapter information database population skipped, This is OK for a standalone build.',e)
82+
except Exception as e:
83+
print('Chapter Information Creation Failed with', e)
8084

8185
if rc == 0:
8286
print("Done, {} build successful".format(options.build.project_name))

0 commit comments

Comments
 (0)