summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_yum_add_repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_yum_add_repo.py')
-rw-r--r--cloudinit/config/cc_yum_add_repo.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py
index 0d836f28..64fba869 100644
--- a/cloudinit/config/cc_yum_add_repo.py
+++ b/cloudinit/config/cc_yum_add_repo.py
@@ -18,9 +18,10 @@
import os
-from cloudinit import util
-
import configobj
+import six
+
+from cloudinit import util
def _canonicalize_id(repo_id):
@@ -37,7 +38,7 @@ def _format_repo_value(val):
# Can handle 'lists' in certain cases
# See: http://bit.ly/Qqrf1t
return "\n ".join([_format_repo_value(v) for v in val])
- if not isinstance(val, (basestring, str)):
+ if not isinstance(val, six.string_types):
return str(val)
return val
@@ -91,7 +92,7 @@ def handle(name, cfg, _cloud, log, _args):
for req_field in ['baseurl']:
if req_field not in repo_config:
log.warn(("Repository %s does not contain a %s"
- " configuration 'required' entry"),
+ " configuration 'required' entry"),
repo_id, req_field)
missing_required += 1
if not missing_required: