Skip to contentSkip to conversation

linux-rpi: ensure config file is closed

PATCH Applied Jonathan Liu 2 participants 2 messages Jun 4, 2016 – Jun 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-rpi: ensure config file is closed

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'>

---
 recipes-kernel/linux/linux-rpi.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-rpi.inc +2 -0
index 1755685..4b65fc2 100644
@@ -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()
 }
Signature · 1 line
2.8.3
#1 lore raw

Hello,

Quoted 20 lines · Jonathan Liu

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'>

---
 recipes-kernel/linux/linux-rpi.inc | 2 ++
 1 file changed, 2 insertions(+)
recipes-kernel/linux/linux-rpi.inc +2 -0
index 1755685..4b65fc2 100644
@@ -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()
 }
Quoted 1 line

https://lists.yoctoproject.org/listinfo/yocto

Merged to master. Thank you.

--
Andrei Gherzan