aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d1e9138c668..0fe9576b4db 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -368,7 +368,8 @@ def append_source_info(file, sourcefile, d, fatal=True):
# is still assuming that.
debuglistoutput = '\0'.join(debugsources) + '\0'
lf = bb.utils.lockfile(sourcefile + ".lock")
- open(sourcefile, 'a').write(debuglistoutput)
+ with open(sourcefile, 'a') as sf:
+ sf.write(debuglistoutput)
bb.utils.unlockfile(lf)