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 C74751381F3 for ; Thu, 20 Jun 2013 07:05:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86E30E09B1; Thu, 20 Jun 2013 07:05:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 11495E09B1 for ; Thu, 20 Jun 2013 07:05:53 +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 0AB4633E656 for ; Thu, 20 Jun 2013 07:05:53 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9C20CE468F for ; Thu, 20 Jun 2013 07:05:51 +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: <1371711934.2a6b69cf6ac36c262e253ce701dd9db5a24d0f25.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/chpathtool.py X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2a6b69cf6ac36c262e253ce701dd9db5a24d0f25 X-VCS-Branch: master Date: Thu, 20 Jun 2013 07:05: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 X-Archives-Salt: beee0e1e-9676-48ee-af60-7e8cbb81918d X-Archives-Hash: 4b6ae0401309b4f26cff36d5a36ecd47 commit: 2a6b69cf6ac36c262e253ce701dd9db5a24d0f25 Author: Zac Medico gentoo org> AuthorDate: Thu Jun 20 07:05:34 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jun 20 07:05:34 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2a6b69cf chpathtool: fix mime_type TypeError, bug #473892 --- bin/chpathtool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/chpathtool.py b/bin/chpathtool.py index 85e608e..a040bab 100755 --- a/bin/chpathtool.py +++ b/bin/chpathtool.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2011-2012 Gentoo Foundation +# Copyright 2011-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import io @@ -41,6 +41,8 @@ class IsTextFile(object): def _is_text_magic(self, filename): mime_type = self._m.file(filename) + if isinstance(mime_type, bytes): + mime_type = mime_type.decode('ascii', 'replace') return mime_type.startswith("text/") def _is_text_encoding(self, filename):