aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2010-11-14 16:25:36 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2010-11-14 16:25:36 -0800
commitdfdfc37e29f8d465158eb39850a6fb7bb34b5c39 (patch)
treefb2649b596ca90e9f12bcf4c81b7bf7510f3604b
parentApply tulcod's g-common support changes. (diff)
downloadoverlord-dfdfc37e29f8d465158eb39850a6fb7bb34b5c39.tar.gz
overlord-dfdfc37e29f8d465158eb39850a6fb7bb34b5c39.tar.bz2
overlord-dfdfc37e29f8d465158eb39850a6fb7bb34b5c39.zip
update to using basestring instead of str.
Otherwise assume it is an iterable.
-rw-r--r--layman/api.py9
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 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