From dfdfc37e29f8d465158eb39850a6fb7bb34b5c39 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sun, 14 Nov 2010 16:25:36 -0800 Subject: update to using basestring instead of str. Otherwise assume it is an iterable. --- layman/api.py | 9 +++++---- 1 file 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 list. produces and error message if it is any other type returns repos as list always""" - if isinstance(repos, str): + if isinstance(repos, basestring): repos = [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" %(caller, str(type(repos)))) + #~ return [] return repos -- cgit v1.2.3-65-gdbad