summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/linkloc.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Tool/linkloc.py')
-rw-r--r--src/engine/SCons/Tool/linkloc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/linkloc.py b/src/engine/SCons/Tool/linkloc.py
index bd643f7a..c73852b7 100644
--- a/src/engine/SCons/Tool/linkloc.py
+++ b/src/engine/SCons/Tool/linkloc.py
@@ -52,8 +52,8 @@ def repl_linker_command(m):
# Replaces any linker command file directives (e.g. "@foo.lnk") with
# the actual contents of the file.
try:
- f=open(m.group(2), "r")
- return m.group(1) + f.read()
+ with open(m.group(2), "r") as f:
+ return m.group(1) + f.read()
except IOError:
# the linker should return an error if it can't
# find the linker command file so we will remain quiet.