From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QxlRv-0007AF-Dz for garchives@archives.gentoo.org; Sun, 28 Aug 2011 19:55:19 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6772721C262; Sun, 28 Aug 2011 19:55:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2FB2E21C25F for ; Sun, 28 Aug 2011 19:55:12 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9E5FC1B40BB for ; Sun, 28 Aug 2011 19:55:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BCE5E80040 for ; Sun, 28 Aug 2011 19:55:10 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <4afee825db23000b28a226b7b488956d4eb8f708.arfrever@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/doebuild.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: 4afee825db23000b28a226b7b488956d4eb8f708 Date: Sun, 28 Aug 2011 19:55:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 6c616d1fe07f93771f984b37cbb94d53 commit: 4afee825db23000b28a226b7b488956d4eb8f708 Author: Arfrever Frehtes Taifersar Arahesis Gentoo Org> AuthorDate: Sun Aug 28 19:54:23 2011 +0000 Commit: Arfrever Frehtes Taifersar Arahesis gentoo org> CommitDate: Sun Aug 28 19:54:23 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D4afee825 Fix "ResourceWarning: unclosed file" with Python 3.2. --- pym/portage/package/ebuild/doebuild.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package= /ebuild/doebuild.py index aa9218c..47b4ec4 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1692,14 +1692,17 @@ def _post_src_install_soname_symlinks(mysettings,= out): "build-info", "NEEDED.ELF.2") =20 try: - lines =3D io.open(_unicode_encode(needed_filename, + f =3D io.open(_unicode_encode(needed_filename, encoding=3D_encodings['fs'], errors=3D'strict'), mode=3D'r', encoding=3D_encodings['repo.content'], - errors=3D'replace').readlines() + errors=3D'replace') + lines =3D f.readlines() except IOError as e: if e.errno not in (errno.ENOENT, errno.ESTALE): raise return + finally: + f.close() =20 libpaths =3D set(portage.util.getlibpaths( mysettings["ROOT"], env=3Dmysettings))