* [PATCH 0/1] package.bbclass: fix python unclosed file ResourceWarning
@ 2018-12-18 6:53 Chen Qi
2018-12-18 6:53 ` [PATCH 1/1] " Chen Qi
0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2018-12-18 6:53 UTC (permalink / raw)
To: openembedded-core
*** BLURB HERE ***
The following changes since commit fe43e599327f26b399c1883205e988236a5e51bd:
gcc: Drop 7.3 since 8.2 is working fine for us (2018-12-15 17:10:52 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/package_warn
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/package_warn
Chen Qi (1):
package.bbclass: fix python unclosed file ResourceWarning
meta/classes/package.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] package.bbclass: fix python unclosed file ResourceWarning
2018-12-18 6:53 [PATCH 0/1] package.bbclass: fix python unclosed file ResourceWarning Chen Qi
@ 2018-12-18 6:53 ` Chen Qi
0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2018-12-18 6:53 UTC (permalink / raw)
To: openembedded-core
Fix the following warning.
ResourceWarning: unclosed file <_io.TextIOWrapper name='/.../systemd/1_239-r0/debugsources.list' mode='a' encoding='UTF-8'>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/classes/package.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d1e9138..0fe9576 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)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-18 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-18 6:53 [PATCH 0/1] package.bbclass: fix python unclosed file ResourceWarning Chen Qi
2018-12-18 6:53 ` [PATCH 1/1] " Chen Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox