From cf80962e51a925d5b895d0ef90c2a15ad99778b3 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 16 Oct 2012 15:24:15 -0700 Subject: Update comments as to why format is the way it is. --- cloudinit/config/cc_yum_add_repo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_yum_add_repo.py b/cloudinit/config/cc_yum_add_repo.py index f0487773..fda3236f 100644 --- a/cloudinit/config/cc_yum_add_repo.py +++ b/cloudinit/config/cc_yum_add_repo.py @@ -34,14 +34,17 @@ def _canonicalize_id(repo_id): def _format_repository_config(repo_id, repo_config): to_be = configobj.ConfigObj() to_be[repo_id] = {} - # Do basic translation of + # Do basic translation of the items -> values for (k, v) in repo_config.items(): if isinstance(v, bool): + # Seems like yum prefers 1/0 if v: v = '1' else: v = '0' elif isinstance(v, (tuple, list)): + # Can handle 'lists' in certain cases + # See: http://bit.ly/Qqrf1t v = "\n ".join(v) # For now assume that peopel using this know # the format of yum and don't verify further -- cgit v1.2.3