From a5f020b377bd47cafc57d75f34bec6df5a2a4504 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 7 Oct 2011 10:55:51 +0000 Subject: [PATCH] Fix ResourceWarning in python_merge_intermediate_installation_images(). (Patch by Arfrever.) --- eclass/python.eclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eclass/python.eclass b/eclass/python.eclass index 10cc916b2937..a64f04bd2800 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.136 2011/10/07 10:53:14 djc Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.137 2011/10/07 10:55:51 djc Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -1623,7 +1623,9 @@ else: # Python 2 stdout = sys.stdout -files = set(open('${T}/python_wrapper_scripts', 'rb').read().rstrip(${b}'\x00').split(${b}'\x00')) +python_wrapper_scripts_file = open('${T}/python_wrapper_scripts', 'rb') +files = set(python_wrapper_scripts_file.read().rstrip(${b}'\x00').split(${b}'\x00')) +python_wrapper_scripts_file.close() for file in sorted(files): stdout.write(file) -- 2.26.2