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 1PorXT-0005CN-1W for garchives@archives.gentoo.org; Mon, 14 Feb 2011 06:03:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11855E098F; Mon, 14 Feb 2011 06:00:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D3F3EE098E 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 7A6021B420C 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 E2BFC80073 for ; Mon, 14 Feb 2011 06:00:25 +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: 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: e4b3560bf8b8dbce3c992086a5697fea7aefa200 Date: Mon, 14 Feb 2011 06:00:25 +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: 03cf429bdf593797be9caaeab54b6dd7 commit: e4b3560bf8b8dbce3c992086a5697fea7aefa200 Author: Brian Dolbec gmail com> AuthorDate: Sun Jul 11 08:54:22 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=3De4b3560b Remove the Output class as it is not needed, was used for initial testing= only. --- layman/api.py | 63 ---------------------------------------------------= ------ 1 files changed, 0 insertions(+), 63 deletions(-) diff --git a/layman/api.py b/layman/api.py index e17d70e..902a951 100644 --- a/layman/api.py +++ b/layman/api.py @@ -325,69 +325,6 @@ class LaymanAPI(object): self._error_messages =3D [] =20 =20 -class Output(Message): - """a subclass of debug.py's Message to overide several output functi= ons - for data capture. May not be in final api""" - =20 - def __init__(self, error=3Dstderr): - self.stderr =3D error - self.captured =3D [] - Message.__init__(self, err=3Derror) - - def notice (self, note): - self.captured.append(note) - - def info (self, info, level =3D 4): - - if type(info) not in types.StringTypes: - info =3D str(info) - - if level > self.info_lev: - return - - for i in info.split('\n'): - self.captured.append(self.maybe_color('green', '* ') + i) - - def status (self, message, status, info =3D 'ignored'): - - if type(message) not in types.StringTypes: - message =3D str(message) - - lines =3D message.split('\n') - - if not lines: - return - - for i in lines[0:-1]: - self.captured.append(self.maybe_color('green', '* ') + i) - - i =3D lines[-1] - - if len(i) > 58: - i =3D i[0:57] - - if status =3D=3D 1: - result =3D '[' + self.maybe_color('green', 'ok') + ']' - elif status =3D=3D 0: - result =3D '[' + self.maybe_color('red', 'failed') + ']' - else: - result =3D '[' + self.maybe_color('yellow', info) + ']' - - self.captured.append( self.maybe_color('green', '* ') + i + ' ' = + '.' * (58 - len(i)) \ - + ' ' + result) - - def warn (self, warn, level =3D 4): - - if type(warn) not in types.StringTypes: - warn =3D str(warn) - - if level > self.warn_lev: - return - - for i in warn.split('\n'): - self.captured.append(self.maybe_color('yellow', '* ') + i) - - def create_fd(): """creates file descriptor pairs an opens them ready for use in place of stdin, stdout, stderr.