From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SR3S7-0008KZ-BN for garchives@archives.gentoo.org; Sun, 06 May 2012 15:32:53 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6EB49E0802; Sun, 6 May 2012 15:32:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3F153E07FE for ; Sun, 6 May 2012 15:32:38 +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 7A36D1B4029 for ; Sun, 6 May 2012 15:32:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 3D76CE5402 for ; Sun, 6 May 2012 15:32:36 +0000 (UTC) From: "Sebastian Pipping" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sebastian Pipping" Message-ID: <1336318239.272ee461a4e7edd3208107242c015360acbd4b3e.sping@gentoo> Subject: [gentoo-commits] proj/userinfo-scripts:master commit in: / X-VCS-Repository: proj/userinfo-scripts X-VCS-Files: git-identity-map.py X-VCS-Directories: / X-VCS-Committer: sping X-VCS-Committer-Name: Sebastian Pipping X-VCS-Revision: 272ee461a4e7edd3208107242c015360acbd4b3e X-VCS-Branch: master Date: Sun, 6 May 2012 15:32: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 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 7a0a0146-aefe-476f-925a-0928d3956298 X-Archives-Hash: 17e0b7205386070e1fa3aef4cfaeb29a commit: 272ee461a4e7edd3208107242c015360acbd4b3e Author: Sebastian Pipping pipping org> AuthorDate: Sun May 6 15:30:39 2012 +0000 Commit: Sebastian Pipping gentoo org> CommitDate: Sun May 6 15:30:39 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/userinfo-scri= pts.git;a=3Dcommit;h=3D272ee461 Extract function produce_line() --- git-identity-map.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/git-identity-map.py b/git-identity-map.py index c83a744..fd87158 100755 --- a/git-identity-map.py +++ b/git-identity-map.py @@ -8,6 +8,11 @@ import xml.etree.ElementTree as ET # Python 2.5 import sys =20 =20 +def produce_line(svn_nick, realname, gentoo_nick): + line =3D '%s =3D %s <%s@gentoo.org>' % (svn_nick, realname, gentoo_nick= ) + print(line.encode('utf-8')) + + def main(args): if len(args) !=3D 2: print('USAGE: %s GENTOO/xml/htdocs/proj/en/devrel/roll-call/userinfo.= xml' % args[0]) @@ -20,12 +25,11 @@ def main(args): return 1 =20 for user in userlist.findall('user'): - nick =3D user.attrib['username'] + svn_nick =3D user.attrib['username'] location =3D user.find('location') realname =3D user.find('realname').attrib['fullname'].strip() =20 - line =3D '%s =3D %s <%s@gentoo.org>' % (nick, realname, nick) - print(line.encode('utf-8')) + produce_line(svn_nick, realname, svn_nick) =20 return 0 =20