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 420631389E2 for ; Thu, 4 Dec 2014 20:16:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3F989E091B; Thu, 4 Dec 2014 20:16:17 +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 CEAF2E091C for ; Thu, 4 Dec 2014 20:16:15 +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 2277B34059D for ; Thu, 4 Dec 2014 20:16:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A15F7B951 for ; Thu, 4 Dec 2014 20:16:11 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1417723115.5e37e1aebb371b0ee36a70e0e166af8398cff926.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/controller.py X-VCS-Directories: pym/portage/sync/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 5e37e1aebb371b0ee36a70e0e166af8398cff926 X-VCS-Branch: master Date: Thu, 4 Dec 2014 20:16:11 +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: a7fa51cf-0a96-4ffc-8167-f9ba2765bb63 X-Archives-Hash: 73eb6ae1f6c0d90d6819fad9069af265 commit: 5e37e1aebb371b0ee36a70e0e166af8398cff926 Author: Brian Dolbec gentoo org> AuthorDate: Thu Dec 4 19:49:22 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:58:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5e37e1ae portage/sync/controller.py: Wrap variables with _unicode_decode for writemsg_level() calls Fixes "BytesWarning: str() on a bytes instance" errors in py3. --- pym/portage/sync/controller.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py index b7c668c..21aa7a7 100644 --- a/pym/portage/sync/controller.py +++ b/pym/portage/sync/controller.py @@ -20,6 +20,7 @@ bad = create_color_func("BAD") warn = create_color_func("WARN") from portage.package.ebuild.doebuild import _check_temp_dir from portage.metadata import action_metadata +from portage import _unicode_decode class TaskHandler(object): @@ -98,7 +99,7 @@ class SyncManager(object): hooks.append((filepath, name)) else: writemsg_level(" %s postsync.d hook: '%s' is not executable\n" - % (warn("*"), name,), level=logging.WARN, noiselevel=2) + % (warn("*"), _unicode_decode(name),), level=logging.WARN, noiselevel=2) self.hooks = hooks @@ -159,13 +160,15 @@ class SyncManager(object): def perform_post_sync_hook(self, reponame, dosyncuri='', repolocation=''): succeeded = os.EX_OK for filepath, hook in self.hooks: - writemsg_level("Spawning post_sync hook: %s\n" % (hook,), + writemsg_level("Spawning post_sync hook: %s\n" + % (_unicode_decode(hook)), level=logging.ERROR, noiselevel=4) retval = portage.process.spawn([filepath, reponame, dosyncuri, repolocation], env=self.settings.environ()) if retval != os.EX_OK: writemsg_level(" %s Spawn failed for: %s, %s\n" % (bad("*"), - hook, filepath), level=logging.ERROR, noiselevel=-1) + _unicode_decode(hook), filepath), + level=logging.ERROR, noiselevel=-1) succeeded = retval return succeeded @@ -182,7 +185,8 @@ class SyncManager(object): except OSError: st = None if st is None: - writemsg_level(">>> '%s' not found, creating it." % repo.location) + writemsg_level(">>> '%s' not found, creating it." + % _unicode_decode(repo.location)) portage.util.ensure_dirs(repo.location, mode=0o755) st = os.stat(repo.location) 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 CB5411389E2 for ; Thu, 4 Dec 2014 20:04:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0F64E0909; Thu, 4 Dec 2014 20:04:39 +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 66E4DE08FB for ; Thu, 4 Dec 2014 20:04:37 +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 5DF9A3405AC for ; Thu, 4 Dec 2014 20:04:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 42B0BB94E for ; Thu, 4 Dec 2014 20:04:32 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1417723115.5e37e1aebb371b0ee36a70e0e166af8398cff926.dol-sen@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/controller.py X-VCS-Directories: pym/portage/sync/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 5e37e1aebb371b0ee36a70e0e166af8398cff926 X-VCS-Branch: plugin-sync Date: Thu, 4 Dec 2014 20:04:32 +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: 935fb4e7-15f4-401b-9f67-e86b90937de1 X-Archives-Hash: 7e79484b06933d2bc416b415927866f4 Message-ID: <20141204200432.LAcS4I4MXcPVS3A_cLfUF03DN3ctKr6NeOlDZwowQgg@z> commit: 5e37e1aebb371b0ee36a70e0e166af8398cff926 Author: Brian Dolbec gentoo org> AuthorDate: Thu Dec 4 19:49:22 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Dec 4 19:58:35 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=5e37e1ae portage/sync/controller.py: Wrap variables with _unicode_decode for writemsg_level() calls Fixes "BytesWarning: str() on a bytes instance" errors in py3. --- pym/portage/sync/controller.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pym/portage/sync/controller.py b/pym/portage/sync/controller.py index b7c668c..21aa7a7 100644 --- a/pym/portage/sync/controller.py +++ b/pym/portage/sync/controller.py @@ -20,6 +20,7 @@ bad = create_color_func("BAD") warn = create_color_func("WARN") from portage.package.ebuild.doebuild import _check_temp_dir from portage.metadata import action_metadata +from portage import _unicode_decode class TaskHandler(object): @@ -98,7 +99,7 @@ class SyncManager(object): hooks.append((filepath, name)) else: writemsg_level(" %s postsync.d hook: '%s' is not executable\n" - % (warn("*"), name,), level=logging.WARN, noiselevel=2) + % (warn("*"), _unicode_decode(name),), level=logging.WARN, noiselevel=2) self.hooks = hooks @@ -159,13 +160,15 @@ class SyncManager(object): def perform_post_sync_hook(self, reponame, dosyncuri='', repolocation=''): succeeded = os.EX_OK for filepath, hook in self.hooks: - writemsg_level("Spawning post_sync hook: %s\n" % (hook,), + writemsg_level("Spawning post_sync hook: %s\n" + % (_unicode_decode(hook)), level=logging.ERROR, noiselevel=4) retval = portage.process.spawn([filepath, reponame, dosyncuri, repolocation], env=self.settings.environ()) if retval != os.EX_OK: writemsg_level(" %s Spawn failed for: %s, %s\n" % (bad("*"), - hook, filepath), level=logging.ERROR, noiselevel=-1) + _unicode_decode(hook), filepath), + level=logging.ERROR, noiselevel=-1) succeeded = retval return succeeded @@ -182,7 +185,8 @@ class SyncManager(object): except OSError: st = None if st is None: - writemsg_level(">>> '%s' not found, creating it." % repo.location) + writemsg_level(">>> '%s' not found, creating it." + % _unicode_decode(repo.location)) portage.util.ensure_dirs(repo.location, mode=0o755) st = os.stat(repo.location)