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 AE2FF13888F for ; Sun, 4 Oct 2015 21:15:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45A6721C018; Sun, 4 Oct 2015 21:15:27 +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 EB51C21C018 for ; Sun, 4 Oct 2015 21:15:26 +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 41E31340877 for ; Sun, 4 Oct 2015 21:15:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C35C653C for ; Sun, 4 Oct 2015 21:15:24 +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: <1443993261.b83c5e476dc69780ff66c0b252ee2e34830cd98d.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/argparser.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: b83c5e476dc69780ff66c0b252ee2e34830cd98d X-VCS-Branch: master Date: Sun, 4 Oct 2015 21:15:24 +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: 683d9584-d01a-457b-8c75-6c782495dc1f X-Archives-Hash: bdcd1253e0962b551429a5190e37ee0e commit: b83c5e476dc69780ff66c0b252ee2e34830cd98d Author: Brian Dolbec gentoo org> AuthorDate: Sat Oct 3 17:14:11 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sun Oct 4 21:14:21 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b83c5e47 repoman/argparser.py: _unicode_decode the commitmsg (bug 562108) Force utf-8 for the comit message to prevent a possible traceback. X-Gentoo-bug: 562108 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=562108 pym/repoman/argparser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/repoman/argparser.py b/pym/repoman/argparser.py index 85e261d..0f34ed0 100644 --- a/pym/repoman/argparser.py +++ b/pym/repoman/argparser.py @@ -1,4 +1,3 @@ -# -*- coding:utf-8 -*- # repoman: Argument parser # Copyright 2007-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 @@ -11,6 +10,7 @@ import sys # import our initialized portage instance from repoman._portage import portage +from portage import _unicode_decode from portage import util from portage.util._argparse import ArgumentParser @@ -211,6 +211,9 @@ def parse_args(argv, qahelp, repoman_default_opts): logger = logging.getLogger() logger.setLevel(logger.getEffectiveLevel() + 10) + if opts.mode == 'commit' and opts.commitmsg: + opts.commitmsg = _unicode_decode(opts.commitmsg) + if opts.mode == 'commit' and not (opts.force or opts.pretend): if opts.ignore_masked: opts.ignore_masked = False