From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5A5C6138010 for ; Wed, 12 Sep 2012 04:57:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F256D21C049; Wed, 12 Sep 2012 04:56:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B060721C037 for ; Wed, 12 Sep 2012 04:56:59 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EC05A33CEA4 for ; Wed, 12 Sep 2012 04:56:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A12E1E543C for ; Wed, 12 Sep 2012 04:56:54 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1347425799.5614fa2d7cef0b509136fd00c52a8436d41a3647.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/herdbase.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 5614fa2d7cef0b509136fd00c52a8436d41a3647 X-VCS-Branch: master Date: Wed, 12 Sep 2012 04:56:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0b90dba3-d315-4b12-9e01-64d1ef097652 X-Archives-Hash: f39682702a903c3bf9dd83905bcda953 commit: 5614fa2d7cef0b509136fd00c52a8436d41a3647 Author: Zac Medico gentoo org> AuthorDate: Wed Sep 12 04:56:39 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Sep 12 04:56:39 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5614fa2d make_herd_base: encode unicode file paths safely This will fix cases similar to the one fixed in commit f01d7a8ca158ec60df76a3e8ae5b80ac3f62429e for bug #310789. --- pym/repoman/herdbase.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/pym/repoman/herdbase.py b/pym/repoman/herdbase.py index fcf58b3..4c420d0 100644 --- a/pym/repoman/herdbase.py +++ b/pym/repoman/herdbase.py @@ -17,6 +17,8 @@ except (ImportError, SystemError, RuntimeError, Exception): # modules, so that ImportModulesTestCase can succeed (or # possibly alert us about unexpected import failures). pass + +from portage import _encodings, _unicode_encode from portage.exception import FileNotFound, ParseError, PermissionDenied __all__ = [ @@ -56,7 +58,8 @@ def make_herd_base(filename): all_emails = set() try: - xml_tree = xml.etree.ElementTree.parse(filename, + xml_tree = xml.etree.ElementTree.parse(_unicode_encode(filename, + encoding=_encodings['fs'], errors='strict'), parser=xml.etree.ElementTree.XMLParser( target=_HerdsTreeBuilder())) except ExpatError as e: