coverpage: Fix repeated entries.

Closes #2865.
This commit is contained in:
Chris Johns
2017-08-11 03:42:55 +00:00
parent efc29ff31b
commit feb68323b7
2 changed files with 4 additions and 2 deletions

View File

@@ -378,17 +378,17 @@ def xml_catalogue(ctx, building):
catalogue = {}
sp = sys.path[:]
for doc in building:
sys.path.insert(0, top_dir.find_node(doc).abspath())
#
# Import using the imp API so the module is reloaded for us.
#
import imp
sys.path = [top_dir.find_node(doc).abspath()]
mf = imp.find_module('conf')
sys.path = sp[:]
try:
bconf = imp.load_module('bconf', mf[0], mf[1], mf[2])
finally:
mf[0].close()
sys.path = sp[:]
catalogue[doc] = {
'title': bconf.project,
'version': str(ctx.env.VERSION),