[yocto] [meta-raspberrypi][PATCH] linux-rpi: ensure config file is closed
Jonathan Liu
net147 at gmail.com
Sat Jun 4 08:38:52 PDT 2016
Avoids warnings like this with python3:
WARNING: .../meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.18.bb: <string>:16: ResourceWarning: unclosed file <_io.TextIOWrapper name='.../meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/defconfig' mode='r' encoding='UTF-8'>
Signed-off-by: Jonathan Liu <net147 at gmail.com>
---
recipes-kernel/linux/linux-rpi.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
index 1755685..4b65fc2 100644
--- a/recipes-kernel/linux/linux-rpi.inc
+++ b/recipes-kernel/linux/linux-rpi.inc
@@ -133,4 +133,6 @@ python () {
if 'CONFIG_KERNEL_LZO=y\n' in configfile.readlines():
depends = d.getVar('DEPENDS', False)
d.setVar('DEPENDS', depends + ' lzop-native')
+
+ configfile.close()
}
--
2.8.3
More information about the yocto
mailing list