Back to python2
authorMatthieu Coudron <mattator@gmail.com>
Wed, 16 Nov 2016 20:29:23 +0100
changeset 770 ba361f714b7a
parent 769 d8a26975077a
child 771 4ab31ef25d4a
Back to python2
ns3waf/__init__.py
--- a/ns3waf/__init__.py	Tue Nov 08 00:08:17 2016 +0100
+++ b/ns3waf/__init__.py	Wed Nov 16 20:29:23 2016 +0100
@@ -339,13 +339,14 @@
 
         outfile = file(task.outputs[0].abspath(), "w")
 
-        print("""
+        guard = """
 #ifdef NS3_MODULE_COMPILATION
 # error "Do not include ns3 module aggregator headers from other modules; these are meant only for end user scripts."
 #endif
 
-#ifndef NS3_MODULE_%s
-    """ % (name.upper().replace('-', '_'),), file=outfile)
+#ifndef NS3_MODULE_{module}
+    """.format(module=name.upper().replace('-', '_'))
+        print >>  outfile, guard
 
         # this is not python3 compatible but doesn't seem to be called so leave it likethis
         print >> outfile