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 1SM5jP-0001KL-8F for garchives@archives.gentoo.org; Sun, 22 Apr 2012 22:58:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D5E33E0660; Sun, 22 Apr 2012 22:58:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A0152E0660 for ; Sun, 22 Apr 2012 22:58:02 +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 DA6941B40F4 for ; Sun, 22 Apr 2012 22:58:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9D973E5402 for ; Sun, 22 Apr 2012 22:58:00 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1335135467.d55266683484aa4f32fab5e18c69b6cd2f0a6bb1.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/checks.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: d55266683484aa4f32fab5e18c69b6cd2f0a6bb1 X-VCS-Branch: master Date: Sun, 22 Apr 2012 22:58:00 +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: 5aaec2cb-562a-4382-afc3-7b75d48ba989 X-Archives-Hash: 400c8ae5a59b4aa8f6c33e254a34fd98 commit: d55266683484aa4f32fab5e18c69b6cd2f0a6bb1 Author: Zac Medico gentoo org> AuthorDate: Sun Apr 22 22:57:47 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Apr 22 22:57:47 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dd5526668 EapiDefinition: handle impossible "%d" % None --- pym/repoman/checks.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py index c3d110f..735e90e 100644 --- a/pym/repoman/checks.py +++ b/pym/repoman/checks.py @@ -1,5 +1,5 @@ # repoman: Checks -# Copyright 2007, 2011 Gentoo Foundation +# Copyright 2007-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 """This module contains functions used in Repoman to ascertain the quali= ty @@ -306,14 +306,18 @@ class EapiDefinition(LineCheck): self._parsed_eapi =3D m.group(2) =20 def end(self): + eapi_line_num =3D self._eapi_line_num + if eapi_line_num is None: + # This shouldn't be necessary, but handle it anyway. + eapi_line_num =3D 1 if self._parsed_eapi is None: if self._cached_eapi !=3D "0": yield "valid EAPI assignment must occur on or before line: %d" % \ - self._eapi_line_num + eapi_line_num elif self._parsed_eapi !=3D self._cached_eapi: yield ("bash returned EAPI '%s' which does not match " "assignment on line: %d") % \ - (self._cached_eapi, self._eapi_line_num) + (self._cached_eapi, eapi_line_num) =20 class EbuildPatches(LineCheck): """Ensure ebuilds use bash arrays for PATCHES to ensure white space saf= ety"""