diff options
author | Tom Zanussi <tom.zanussi@linux.intel.com> | 2013-03-29 16:48:50 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-05 22:54:29 +0100 |
commit | df1ad143c3addd68b111e1544ce572c044fac1ca (patch) | |
tree | a1e2385188c81c633cf8af7651b8c553505b56d6 /scripts/lib/bsp/engine.py | |
parent | fd67cfd1c567294e21485be82f8051379b695fbe (diff) | |
download | ast2050-yocto-poky-df1ad143c3addd68b111e1544ce572c044fac1ca.zip ast2050-yocto-poky-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/lib/bsp/engine.py')
-rw-r--r-- | scripts/lib/bsp/engine.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index 86cb51c..36bd446 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py @@ -571,7 +571,8 @@ def replace_file(replace_this, with_this): the original filename. """ try: - shutil.copy(with_this, replace_this) + replace_this.close() + shutil.copy(with_this, replace_this.name) except IOError: pass |