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 1RJghW-00019x-OD for garchives@archives.gentoo.org; Fri, 28 Oct 2011 07:18:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B692E21C039; Fri, 28 Oct 2011 07:17:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8721721C039 for ; Fri, 28 Oct 2011 07:17:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 080ED1B4014 for ; Fri, 28 Oct 2011 07:17:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 73DE880042 for ; Fri, 28 Oct 2011 07:17:51 +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: <24fb1338cb852950fffdad058cb1d88ef2eec43a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 24fb1338cb852950fffdad058cb1d88ef2eec43a Date: Fri, 28 Oct 2011 07:17:51 +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: 1ee989786f8a82699c1816edc5bdbc22 commit: 24fb1338cb852950fffdad058cb1d88ef2eec43a Author: Zac Medico gentoo org> AuthorDate: Fri Oct 28 07:17:25 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Oct 28 07:17:25 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D24fb1338 RepoConfigLoader: python3.2 readfp deprecation --- pym/portage/repository/config.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/co= nfig.py index d6a648e..06a4d94 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -326,7 +326,14 @@ class RepoConfigLoader(object): def _parse(paths, prepos, ignored_map, ignored_location_map): """Parse files in paths to load config""" parser =3D SafeConfigParser() - # use readfp in order to control decoding of unicode + + # use read_file/readfp in order to control decoding of unicode + try: + # Python >=3D3.2 + read_file =3D parser.read_file + except AttributeError: + read_file =3D parser.readfp + for p in paths: f =3D None try: @@ -338,7 +345,7 @@ class RepoConfigLoader(object): pass else: try: - parser.readfp(f) + read_file(f) except ParsingError as e: writemsg(_unicode_decode( _("!!! Error while reading repo config file: %s\n")