summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-10-16 15:24:15 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-10-16 15:24:15 -0700
commitcf80962e51a925d5b895d0ef90c2a15ad99778b3 (patch)
treedc2998e87f867123547d4388a552c8c001d5d80e /cloudinit
parente8371b113c078f3017c44804662960da9a04abf2 (diff)
downloadvyos-cloud-init-cf80962e51a925d5b895d0ef90c2a15ad99778b3.tar.gz
vyos-cloud-init-cf80962e51a925d5b895d0ef90c2a15ad99778b3.zip
Update comments as to why format is the way it is.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_yum_add_repo.py5
1 files changed, 4 insertions, 1 deletions
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