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 1QxmYH-0004Ar-Ej for garchives@archives.gentoo.org; Sun, 28 Aug 2011 21:05:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1303921C1A8; Sun, 28 Aug 2011 21:05:50 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D67C921C1C3 for ; Sun, 28 Aug 2011 21:05:49 +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 2CF851B40B0 for ; Sun, 28 Aug 2011 21:05:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 2B29180040 for ; Sun, 28 Aug 2011 21:05:48 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <566a9776d3ca10ccf1b646fba154fa71ccaf4ff6.zmedico@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: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 566a9776d3ca10ccf1b646fba154fa71ccaf4ff6 Date: Sun, 28 Aug 2011 21:05:48 +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: aebc05112fbf59e43ed08d63a0df9625 commit: 566a9776d3ca10ccf1b646fba154fa71ccaf4ff6 Author: Zac Medico gentoo org> AuthorDate: Sun Aug 28 21:04:41 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Aug 28 21:04:41 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D566a9776 Fix possible NameError in finally block. --- pym/portage/package/ebuild/doebuild.py | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/pym/portage/package/ebuild/doebuild.py b/pym/portage/package= /ebuild/doebuild.py index 47b4ec4..c252e86 100644 --- a/pym/portage/package/ebuild/doebuild.py +++ b/pym/portage/package/ebuild/doebuild.py @@ -1691,6 +1691,7 @@ def _post_src_install_soname_symlinks(mysettings, o= ut): needed_filename =3D os.path.join(mysettings["PORTAGE_BUILDDIR"], "build-info", "NEEDED.ELF.2") =20 + f =3D None try: f =3D io.open(_unicode_encode(needed_filename, encoding=3D_encodings['fs'], errors=3D'strict'), @@ -1702,7 +1703,8 @@ def _post_src_install_soname_symlinks(mysettings, o= ut): raise return finally: - f.close() + if f is not None: + f.close() =20 libpaths =3D set(portage.util.getlibpaths( mysettings["ROOT"], env=3Dmysettings))