Skip to content

Commit

Permalink
wscript_build: string concatenation efficiency cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Bjoern Jacke <[email protected]>
Reviewed-by: Matthias Dieter Wallnöfer <[email protected]>

Autobuild-User(master): Björn Jacke <[email protected]>
Autobuild-Date(master): Tue Sep 24 13:40:21 UTC 2019 on sn-devel-184
  • Loading branch information
Björn Jacke authored and Bjoern Jacke committed Sep 24, 2019
1 parent c9088c6 commit 4f5c4df
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions docs-xml/wscript_build
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,22 @@ def smbdotconf_generate_parameter_list(task):
articles = task.inputs

entities = bld.pathconfig_entities()
t = "<!DOCTYPE section [\n"

for entity in entities:
t += "%s\n" % entity

# We need this if we build with Heimdal
mit_kdc_path = '"/usr/sbin/krb5kdc"'

# The MIT krb5kdc path is set if we build with MIT Kerberos
if bld.CONFIG_SET('MIT_KDC_PATH'):
mit_kdc_path = bld.CONFIG_GET('MIT_KDC_PATH')

t += "<!ENTITY pathconfig.MITKDCPATH %s>\n" % mit_kdc_path

t += "]>\n"
t += "<section>\n"
for article in articles:
t += article.read()
t = "<!DOCTYPE section [\n" +\
"\n".join(entities) +\
"\n" +\
"<!ENTITY pathconfig.MITKDCPATH " + mit_kdc_path + ">\n" +\
"]>\n" +\
"<section>\n" +\
"".join(art.read() for art in articles) +\
"</section>\n"

t += "</section>\n"
save_file(parameter_all, t , create_dir=True)
return 0

Expand Down

0 comments on commit 4f5c4df

Please sign in to comment.