dev-arm: Fix VExpressFastmodel.py indentation
[gem5.git] / SConstruct
index 110f9c896f7810b8fdc8d0021be6c6e8255754e1..b93a000266782bfb5d08006c85d84f91112eb853 100755 (executable)
@@ -1013,10 +1013,9 @@ export_vars += ['USE_FENV', 'TARGET_ISA', 'TARGET_GPU_ISA', 'CP_ANNOTATE',
 # operands are the name of the variable and a Value node containing the
 # value of the variable.
 def build_config_file(target, source, env):
-    (variable, value) = [s.get_contents() for s in source]
-    f = file(str(target[0]), 'w')
-    print('#define', variable, value, file=f)
-    f.close()
+    (variable, value) = [s.get_contents().decode('utf-8') for s in source]
+    with open(str(target[0]), 'w') as f:
+        print('#define', variable, value, file=f)
     return None
 
 # Combine the two functions into a scons Action object.