summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2013-03-29 16:48:50 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-05 22:54:29 +0100
commitdf1ad143c3addd68b111e1544ce572c044fac1ca (patch)
treea1e2385188c81c633cf8af7651b8c553505b56d6 /scripts
parentfd67cfd1c567294e21485be82f8051379b695fbe (diff)
downloadpoky-df1ad143c3addd68b111e1544ce572c044fac1ca.tar.gz
yocto-bsp: have replace_file() close file before copying
replace_file needs to make sure the file it's replacing is closed before replacing it, otherwise unexpected results may ensue. Fixes [YOCTO #4145]. (From meta-yocto rev: 1339dbb690d51456b4474356992e430638469e47) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/bsp/engine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py
index 86cb51c5f4..36bd446e2b 100644
--- a/scripts/lib/bsp/engine.py
+++ b/scripts/lib/bsp/engine.py
@@ -571,7 +571,8 @@ def replace_file(replace_this, with_this):
571 the original filename. 571 the original filename.
572 """ 572 """
573 try: 573 try:
574 shutil.copy(with_this, replace_this) 574 replace_this.close()
575 shutil.copy(with_this, replace_this.name)
575 except IOError: 576 except IOError:
576 pass 577 pass
577 578