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 1PorVu-0004gX-Kd for garchives@archives.gentoo.org; Mon, 14 Feb 2011 06:02:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DACE9E09C7; Mon, 14 Feb 2011 06:00:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AA452E09C2 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 5DED51B4218 for ; Mon, 14 Feb 2011 06:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C51538006A 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: 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: ae654d7a403eb2d018543a9034a408689f26484c 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: c81140d294fc2a690fc0362816523e20 commit: ae654d7a403eb2d018543a9034a408689f26484c Author: Brian Dolbec gmail com> AuthorDate: Mon Nov 15 00:25:36 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=3Dae654d7a update to using basestring instead of str. Otherwise assume it is an iterable. --- layman/api.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/layman/api.py b/layman/api.py index a3ac497..4dacf99 100644 --- a/layman/api.py +++ b/layman/api.py @@ -99,11 +99,12 @@ class LaymanAPI(object): 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): + if isinstance(repos, basestring): repos =3D [repos] - elif not isinstance(repos, list): - self._error(2, "%s(), Unsupported input type: %s" %(caller, = str(type(repos)))) - return [] + # else assume it is an iterable, if not it will error + #~ elif not isinstance(repos, list): + #~ self._error(2, "%s(), Unsupported input type: %s" %(calle= r, str(type(repos)))) + #~ return [] return repos =20 =20