##// END OF EJS Templates
templater: unroll loop over mapfile directories...
Martin von Zweigbergk -
r45872:d9a502a0 default
parent child Browse files
Show More
@@ -829,17 +829,22 b' def _readmapfile(fp, mapfile):'
829 829 conf = config.config()
830 830
831 831 def include(rel, remap, sections):
832 templatedirs = [base, templatedir()]
833 for dir in templatedirs:
834 if dir is None:
835 continue
832 subresource = None
833 if base:
834 abs = os.path.normpath(os.path.join(base, rel))
835 if os.path.isfile(abs):
836 subresource = util.posixfile(abs, b'rb')
837 if not subresource:
838 dir = templatedir()
839 if dir:
836 840 abs = os.path.normpath(os.path.join(dir, rel))
837 841 if os.path.isfile(abs):
838 data = util.posixfile(abs, b'rb').read()
842 subresource = util.posixfile(abs, b'rb')
843 if subresource:
844 data = subresource.read()
839 845 conf.parse(
840 abs, data, sections=sections, remap=remap, include=include
846 abs, data, sections=sections, remap=remap, include=include,
841 847 )
842 break
843 848
844 849 data = fp.read()
845 850 conf.parse(mapfile, data, remap={b'': b'templates'}, include=include)
General Comments 0
You need to be logged in to leave comments. Login now