summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-04-28 21:37:36 (GMT)
committerMats Wichmann <mats@linux.com>2019-04-28 21:42:03 (GMT)
commita4ea7c1e2fa09016c0d99bf2bc7a7e57ae43ad15 (patch)
tree54c4fe0153b8fda3171e906435567760cd5fe4b8 /src/engine
parentc3b0bb3b4d15a33c93413cb3cfaea3469f56c31b (diff)
downloadSCons-a4ea7c1e2fa09016c0d99bf2bc7a7e57ae43ad15.zip
SCons-a4ea7c1e2fa09016c0d99bf2bc7a7e57ae43ad15.tar.gz
SCons-a4ea7c1e2fa09016c0d99bf2bc7a7e57ae43ad15.tar.bz2
Fix misplaced file closing
One file close ended up in the wrong method, meaning it was closing a file which needed to stay open for further reading, while another method of the same name in a different class was missing one. (this didn't trigger any test fails, hmmm, just visual inspection) Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/msvs.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 62a01fa..297c083 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -685,17 +685,18 @@ class _GenerateV6DSP(_DSPGenerator):
return # doesn't exist yet, so can't add anything to configs.
line = dspfile.readline()
+ # skip until marker
while line:
if line.find("# End Project") > -1:
break
line = dspfile.readline()
+ # read to get configs
line = dspfile.readline()
datas = line
while line and line != '\n':
line = dspfile.readline()
datas = datas + line
- dspfile.close()
# OK, we've found our little pickled cache of data.
try:
@@ -708,6 +709,7 @@ class _GenerateV6DSP(_DSPGenerator):
self.configs.update(data)
+ # keep reading to get sources
data = None
line = dspfile.readline()
datas = line
@@ -1000,17 +1002,18 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
return # doesn't exist yet, so can't add anything to configs.
line = dspfile.readline()
+ # skip until marker
while line:
if line.find('<!-- SCons Data:') > -1:
break
line = dspfile.readline()
+ # read to get configs
line = dspfile.readline()
datas = line
while line and line != '\n':
line = dspfile.readline()
datas = datas + line
- dspfile.close()
# OK, we've found our little pickled cache of data.
try:
@@ -1023,12 +1026,14 @@ class _GenerateV7DSP(_DSPGenerator, _GenerateV7User):
self.configs.update(data)
+ # keep reading to get sources
data = None
line = dspfile.readline()
datas = line
while line and line != '\n':
line = dspfile.readline()
datas = datas + line
+ dspfile.close()
# OK, we've found our little pickled cache of data.
try: