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 2ED92138827 for ; Fri, 2 Oct 2015 05:08:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37450E0882; Fri, 2 Oct 2015 05:08:40 +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 BD0C7E0882 for ; Fri, 2 Oct 2015 05:08:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B65B234091F for ; Fri, 2 Oct 2015 05:08:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F522279 for ; Fri, 2 Oct 2015 05:08:36 +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: <1443762354.ee0ac6e6b18438098070d9162d6939832f2d14ed.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/checksum.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ee0ac6e6b18438098070d9162d6939832f2d14ed X-VCS-Branch: master Date: Fri, 2 Oct 2015 05:08:36 +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: e2efcaaa-7001-49fb-ab5f-a02d4dbf9bf9 X-Archives-Hash: 9e2989a66979bc7c337dcb681b357fc4 commit: ee0ac6e6b18438098070d9162d6939832f2d14ed Author: Zac Medico gentoo org> AuthorDate: Thu Oct 1 20:53:15 2015 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Oct 2 05:05:54 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ee0ac6e6 checksum._open_file: fix BytesWarning Fix the following warning message: pym/portage/checksum.py:25: BytesWarning: str() on a bytes instance func_call = "open('%s')" % filename Acked-by: Brian Dolbec gentoo.org> pym/portage/checksum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py index 642602e..cdf4670 100644 --- a/pym/portage/checksum.py +++ b/pym/portage/checksum.py @@ -7,7 +7,7 @@ from portage.const import PRELINK_BINARY, HASHING_BLOCKSIZE from portage.localization import _ from portage import os from portage import _encodings -from portage import _unicode_encode +from portage import _unicode_decode, _unicode_encode import errno import stat import subprocess @@ -22,7 +22,7 @@ def _open_file(filename): return open(_unicode_encode(filename, encoding=_encodings['fs'], errors='strict'), 'rb') except IOError as e: - func_call = "open('%s')" % filename + func_call = "open('%s')" % _unicode_decode(filename) if e.errno == errno.EPERM: raise portage.exception.OperationNotPermitted(func_call) elif e.errno == errno.EACCES: