Fix ResourceWarning in python_merge_intermediate_installation_images().
authorDirkjan Ochtman <djc@gentoo.org>
Fri, 7 Oct 2011 10:55:51 +0000 (10:55 +0000)
committerDirkjan Ochtman <djc@gentoo.org>
Fri, 7 Oct 2011 10:55:51 +0000 (10:55 +0000)
(Patch by Arfrever.)

eclass/python.eclass

index 10cc916b2937227da650519ac03ab422642d070d..a64f04bd28006168715288e9ac03decf5f7c01d4 100644 (file)
@@ -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)