summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Platform/darwin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Platform/darwin.py')
-rw-r--r--src/engine/SCons/Platform/darwin.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/engine/SCons/Platform/darwin.py b/src/engine/SCons/Platform/darwin.py
index c85b75b..fd697f6 100644
--- a/src/engine/SCons/Platform/darwin.py
+++ b/src/engine/SCons/Platform/darwin.py
@@ -56,12 +56,11 @@ def generate(env):
for file in filelist:
if os.path.isfile(file):
- f = open(file, 'r')
- lines = f.readlines()
- for line in lines:
- if line:
- env.AppendENVPath('PATHOSX', line.strip('\n'))
- f.close()
+ with open(file, 'r') as f:
+ lines = f.readlines()
+ for line in lines:
+ if line:
+ env.AppendENVPath('PATHOSX', line.strip('\n'))
# Not sure why this wasn't the case all along?
if env['ENV'].get('PATHOSX', False) and os.environ.get('SCONS_USE_MAC_PATHS', False):