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 1PorXN-0005B0-Vw for garchives@archives.gentoo.org; Mon, 14 Feb 2011 06:03:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54FA5E09C0; Mon, 14 Feb 2011 06:00:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0A851E098E for ; Mon, 14 Feb 2011 06:00:26 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B24A81B4094 for ; Mon, 14 Feb 2011 06:00:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 26EC38006A for ; Mon, 14 Feb 2011 06:00:26 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <5a949d21c92aa729490bd9aa268354c5c08844ee.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/api.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 5a949d21c92aa729490bd9aa268354c5c08844ee Date: Mon, 14 Feb 2011 06:00:26 +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: X-Archives-Hash: d86573cf0f47359fb84694a21b3995be commit: 5a949d21c92aa729490bd9aa268354c5c08844ee Author: Brian Dolbec gmail com> AuthorDate: Sun Jul 11 21:04:57 2010 +0000 Commit: Brian Dolbec gmail com> CommitDate: Fri Feb 11 10:49:14 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D5a949d21 fix some typos, copy/paste errors, and debug/fix some changes to the api. --- layman/api.py | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layman/api.py b/layman/api.py index 902a951..daf57a9 100644 --- a/layman/api.py +++ b/layman/api.py @@ -172,18 +172,18 @@ class LaymanAPI(object): for id in repos: if not self.is_repo(id): self._error(1, UNKNOWN_REPO_ID %id) - result[id] =3D ('', False, False)) + result[id] =3D ('', False, False) try: overlay =3D self._available_db.select(id) except UnknownOverlayException, error: self._error(2, "Error: %s" %str(error)) - result[id] =3D ('', False, False)) + result[id] =3D ('', False, False) else: # Is the overlay supported? info =3D overlay.__str__() official =3D overlay.is_official() supported =3D overlay.is_supported() - result[id] =3D (info, official, supported) + result[id] =3D (info, official, supported) =20 return result =20 @@ -195,7 +195,7 @@ class LaymanAPI(object): @param repos: ['repo-id1', ...] or 'repo-id' @rtype bool or {'repo-id': bool,...} """ - fatal =3D [] + fatals =3D [] warnings =3D [] success =3D [] repos =3D self._check_repo_type(repos, "sync") @@ -210,7 +210,7 @@ class LaymanAPI(object): try: ordb =3D self._available_db.select(id) except UnknownOverlayException: - message =3D 'Overlay "%s" could not be found in the remo= te lists.\n' + message =3D 'Overlay "%s" could not be found in the remo= te lists.\n' \ 'Please check if it has been renamed and re-add = if necessary.' %id warnings.append((id, message)) else: @@ -253,17 +253,17 @@ class LaymanAPI(object): if output_results: if success: self.output.info('\nSuccess:\n------\n', 3) - for result in success: + for id, result in success: self.output.info(result, 3) =20 if warnings: self.output.warn('\nWarnings:\n------\n', 2) - for result in warnings: + for id, result in warnings: self.output.warn(result + '\n', 2) =20 if fatals: self.output.error('\nErrors:\n------\n') - for result in fatals: + for id, result in fatals: self.output.error(result + '\n') return False else: