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 1PqkZo-00075v-MX for garchives@archives.gentoo.org; Sat, 19 Feb 2011 11:02:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E72361C00E; Sat, 19 Feb 2011 11:01:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id ACF091C00E for ; Sat, 19 Feb 2011 11:01:45 +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 215BE1B403A for ; Sat, 19 Feb 2011 11:01:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 69F028006A for ; Sat, 19 Feb 2011 11:01:44 +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: <7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17.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: 7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17 Date: Sat, 19 Feb 2011 11:01:44 +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: a1eb5fc38ca5e463d15b5c08cea55a02 commit: 7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17 Author: Brian Dolbec gmail com> AuthorDate: Sat Feb 19 10:43:11 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Feb 19 10:43:11 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D7a970a99 eliminate the need to import Message, cleanup some stale comments. --- layman/api.py | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/layman/api.py b/layman/api.py index 63682f6..8081bcb 100644 --- a/layman/api.py +++ b/layman/api.py @@ -21,8 +21,6 @@ from layman.config import BareConfig from layman.dbbase import UnknownOverlayException, UnknownOverlayMessage from layman.db import DB, RemoteDB #from layman.utils import path, delete_empty_directory -#from layman.debug import OUT -from layman.output import OUT =20 # give them some values for now, these are from the packagekit backend # TODO establish some proper errors for the api. @@ -31,11 +29,6 @@ ERROR_INTERNAL_ERROR =3D -2 UNKNOWN_REPO_ID =3D "Repo ID '%s' " + \ "is not listed in the current available overlays list" =20 -# In order to redirect output you need to get a Message class instance w= ith the -# stderr, stdout, stddebug directed to where you want. -# eg: output =3D Message('layman', err=3Dmystderr, dbg=3Dmydebug, out=3D= myoutput) -# there are many more options available, refer to debug.py Message class - =20 class LaymanAPI(object): """class to hold and run a layman instance for use by API consumer a= pps, guis, etc. @@ -54,10 +47,10 @@ class LaymanAPI(object): default is Message(module=3D'layman'= ) other params are defaults. """ =20 - self.output =3D output if output else OUT - self.config =3D config if config else BareConfig(output=3Doutput= ) =20 + self.output =3D self.config['output'] + self.report_errors =3D report_errors =20 # get installed and available dbs