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 01B6558974 for ; Thu, 4 Feb 2016 18:01:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4111E21C026; Thu, 4 Feb 2016 18:01:22 +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 CF6F421C026 for ; Thu, 4 Feb 2016 18:01:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8BC3C34092E for ; Thu, 4 Feb 2016 18:01:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C5E918E1 for ; Thu, 4 Feb 2016 18:01:17 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1454608601.d63a4b1b586b4a1f5f6d841af582bb7fd1bcecff.vapier@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: man/ X-VCS-Repository: proj/portage-utils X-VCS-Files: man/mkman.py X-VCS-Directories: man/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: d63a4b1b586b4a1f5f6d841af582bb7fd1bcecff X-VCS-Branch: master Date: Thu, 4 Feb 2016 18:01:17 +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: f94c908e-d6e4-4173-9d25-f2b6ef06b8c2 X-Archives-Hash: 1d7ad6c0ea20ea951b4f5ea0b27d0559 commit: d63a4b1b586b4a1f5f6d841af582bb7fd1bcecff Author: Mike Frysinger gentoo org> AuthorDate: Thu Feb 4 17:56:41 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Feb 4 17:56:41 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d63a4b1b man: get mkman.py working under py2 & py3 man/mkman.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/man/mkman.py b/man/mkman.py index cd0fa7a..1ec8584 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- """Generate man pages for the q applets""" @@ -25,7 +26,7 @@ Q = os.path.join(TOPDIR, 'q') def FindApplets(): """Return a list of all supported applets""" applets = os.path.join(TOPDIR, 'applets.sh') - return subprocess.check_output([applets]).splitlines() + return subprocess.check_output([applets]).decode('ascii').splitlines() COMMON_AUTHORS = [ @@ -61,7 +62,7 @@ def MkMan(applets, applet, output): # Extract the main use string and description: # Usage: q : invoke a portage utility applet - ahelp = subprocess.check_output([Q, applet, '--help']) + ahelp = subprocess.check_output([Q, applet, '--help']).decode('ascii') lines = ahelp.splitlines() m = re.search(r'^Usage: %s (.*) : (.*)' % applet, ahelp) usage = m.group(1) @@ -77,7 +78,7 @@ def MkMan(applets, applet, output): # Extract all the options options = [] - for line, i in zip(lines, xrange(len(lines))): + for line, i in zip(lines, range(len(lines))): if not line.startswith('Options: '): continue