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 78478138E16 for ; Thu, 13 Feb 2014 22:08:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66736E0B3F; Thu, 13 Feb 2014 22:08:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01454E0B3F for ; Thu, 13 Feb 2014 22:08:31 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E07A133F91A for ; Thu, 13 Feb 2014 22:08:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 0CA8B18873 for ; Thu, 13 Feb 2014 22:08:29 +0000 (UTC) From: "Paul Varner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Paul Varner" Message-ID: <1392329246.8efbfa771e341b1aac91a098fac7d7fb89e261b5.fuzzyray@gentoo> Subject: [gentoo-commits] proj/gentoolkit:gentoolkit commit in: pym/gentoolkit/revdep_rebuild/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: pym/gentoolkit/revdep_rebuild/assign.py X-VCS-Directories: pym/gentoolkit/revdep_rebuild/ X-VCS-Committer: fuzzyray X-VCS-Committer-Name: Paul Varner X-VCS-Revision: 8efbfa771e341b1aac91a098fac7d7fb89e261b5 X-VCS-Branch: gentoolkit Date: Thu, 13 Feb 2014 22:08:29 +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: 456d496f-da02-48de-a176-998d576c4377 X-Archives-Hash: dda2897e9fd0eb180dce7522bf58a329 commit: 8efbfa771e341b1aac91a098fac7d7fb89e261b5 Author: Paul Varner gentoo org> AuthorDate: Thu Feb 13 22:07:26 2014 +0000 Commit: Paul Varner gentoo org> CommitDate: Thu Feb 13 22:07:26 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=8efbfa77 Open CONTENTS files as utf-8 to prevent UnicodeDecodeError. --- pym/gentoolkit/revdep_rebuild/assign.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/gentoolkit/revdep_rebuild/assign.py b/pym/gentoolkit/revdep_rebuild/assign.py index 2df6532..22565e8 100644 --- a/pym/gentoolkit/revdep_rebuild/assign.py +++ b/pym/gentoolkit/revdep_rebuild/assign.py @@ -7,6 +7,7 @@ Functions used for determining the package the broken lib belongs to. from __future__ import print_function import os +import io import re import time current_milli_time = lambda: int(round(time.time() * 1000)) @@ -39,7 +40,7 @@ def assign_packages(broken, logger, settings): f = pkgpath + '/CONTENTS' if os.path.exists(f): try: - with open(f, 'r') as cnt: + with io.open(f, 'r', encoding='utf_8') as cnt: for line in cnt.readlines(): m = re.match('^obj (/[^ ]+)', line) if m is not None: