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): the original filename. """ try: - shutil.copy(with_this, replace_this) + replace_this.close() + shutil.copy(with_this, replace_this.name) except IOError: pass