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 1PorVi-0004eQ-1r for garchives@archives.gentoo.org; Mon, 14 Feb 2011 06:02:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 71FF7E099C; Mon, 14 Feb 2011 06:00:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3E582E099C for ; Mon, 14 Feb 2011 06:00:28 +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 DE6CF1B4214 for ; Mon, 14 Feb 2011 06:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 52BAD80072 for ; Mon, 14 Feb 2011 06:00:27 +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: <3f0553996ab99a1923bc35e609efc42008c6d4cd.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: 3f0553996ab99a1923bc35e609efc42008c6d4cd Date: Mon, 14 Feb 2011 06:00:27 +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: a7d4b950fefb949a5c899d704f7a1931 commit: 3f0553996ab99a1923bc35e609efc42008c6d4cd Author: Brian Dolbec gmail com> AuthorDate: Sat Jul 17 06:02:01 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=3D3f055399 some docstring updates --- layman/api.py | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/layman/api.py b/layman/api.py index 7784861..a3ac497 100644 --- a/layman/api.py +++ b/layman/api.py @@ -44,7 +44,14 @@ class LaymanAPI(object): ## It is a near duplicate of the actions classes. =20 def __init__(self, config=3DNone, report_errors=3DFalse, output=3DNo= ne): - """@param configfile, optional config file to use instead of the= default + """ + @param configfile: optional config file to use instead of the de= fault. + can be a BareConfig or ArgsParse= r config class. + default is BareConfig(output=3Do= utput) + @param report_errors: optional bool to silence some error report= ing to stdout + default is False + @param output: optional Message class instance created with your= settings. + default is Message(module=3D'layman'= ) other params are defaults. """ =20 self.output =3D output if output else OUT @@ -88,6 +95,10 @@ class LaymanAPI(object): =20 @staticmethod def _check_repo_type( repos, caller): + """internal function that validates the repos parameter, + converting a string to a list[string] if it is not already a lis= t. + produces and error message if it is any other type + returns repos as list always""" if isinstance(repos, str): repos =3D [repos] elif not isinstance(repos, list): @@ -184,7 +195,6 @@ class LaymanAPI(object): } """ =20 - # In progress, has, been coded to the above dict. yet. repos =3D self._check_repo_type(repos, "get_info") result =3D {} =20